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

       Web browser: ---
            Bug ID: 49641
           Summary: pass user group changes to $wgAuth
           Product: MediaWiki
           Version: 1.21.1
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: User login and signup
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

Created attachment 12557
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=12557&action=edit
patch against 1.21.1 for the new updateExternalDBGroups function

I'm writing an authentication plugin for an authentication system that also
manages Groups. 

In the attached patch (tested against 1.21.1), I am proposing to pass
added/removed groups to the new AuthPlugin::updateExternalDBGroups function.
This function is called when adding/removing groups via Special:Userrights or
when a user is autopromoted.

The rationale (and usefulness) behind this new function is the same as with
AuthPlugin::updateExternalDB being called after User::saveSettings is called in
SpecialPreferences:

User::saveSettings as well as User::addGroup and User::removeGroup feature a
Hook, but this is not sufficient for a plugin that also synchronizes data
*from* the external authentication source:

# I want to save groups *to* the external database when a group is
added/removed via the MediaWiki interface
# I want to synchronize groups *from* the external database whenever a user
logs in. 

The first could be done by implementing the UserAddGroup-Hook in
User::addGroup. But then I cannot use this function to save new groups from the
external database in the second scenario, because the Hook would of course also
be called.

I hope I made my rationale clear and hope to get this function in MediaWiki!
;-)

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