Last modified: 2012-07-31 09:49:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39627, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37627 - create exception for non logged in user
create exception for non logged in user
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: 1.20.0 release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-15 15:04 UTC by Antoine "hashar" Musso (WMF)
Modified: 2012-07-31 09:49 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2012-06-15 15:04:17 UTC
We have several special pages checking if the user is not logged in and then craft their own error page.

A recent change in an extension adds yet another implementation:
https://gerrit.wikimedia.org/r/#/c/11169/

https://gerrit.wikimedia.org/r/#/c/11169/1/special/SpecialOATH.php,unified


We would need a generic exception to be thrown whenever the user is anonymous. So we could just:

if ( $this->getUser()->isAnon() ) {
 throw new NeedLogguedInError( );
}

With a nice default message such as:  "Sorry the action or page you requested is restricted to logged in users".
Comment 1 Antoine "hashar" Musso (WMF) 2012-06-22 10:42:05 UTC
https://gerrit.wikimedia.org/r/12578
Comment 2 Antoine "hashar" Musso (WMF) 2012-07-31 09:49:08 UTC
Change got merged:

RELEASE-NOTE-1.20:
* UserNotLoggedIn() exception to show a generic error page whenever a user is not logged in

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links