https://bugzilla.wikimedia.org/show_bug.cgi?id=37627

       Web browser: ---
             Bug #: 37627
           Summary: create exception for non logged in user
           Product: MediaWiki
           Version: 1.20-git
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General/Unknown
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


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".

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to