Last modified: 2007-01-23 20:10:15 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 T10712, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8712 - Expose user groups as JavaScript variable
Expose user groups as JavaScript variable
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch-reviewed
Depends on:
Blocks: 8741
  Show dependency treegraph
 
Reported: 2007-01-20 00:45 UTC by Carl Fürstenberg
Modified: 2007-01-23 20:10 UTC (History)
0 users

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


Attachments
Patch implementing the functionallity (549 bytes, patch)
2007-01-20 16:16 UTC, Carl Fürstenberg
Details
updated patch (629 bytes, patch)
2007-01-23 16:34 UTC, Carl Fürstenberg
Details

Description Carl Fürstenberg 2007-01-20 00:45:25 UTC
Sometimes you want to have scripts funtion slightly different if you are admin
or not, and it's sometimes rather diffcult to do that. So I propose that a
variable is added, for example "wgUserGroup", that contain the usergroup(s). the
only problem is that if it only should have the "highest" group, or if it should
contain an array of all groups, for example: 

  wgUserGroups = [ 'autoconfirmed' , 'sysop' ];
Comment 1 Carl Fürstenberg 2007-01-20 16:16:51 UTC
Created attachment 3101 [details]
Patch implementing the functionallity

Have made an simple patch that will implement the wanted feature
Comment 2 Rob Church 2007-01-20 19:38:58 UTC
Applied in r19524.
Comment 3 Carl Fürstenberg 2007-01-23 16:34:28 UTC
Created attachment 3126 [details]
updated patch

seems like User::getGroups() don't reply with all we want, so I have changed it
to User::getEffectiveGroups();
Comment 4 Antoine "hashar" Musso (WMF) 2007-01-23 20:10:15 UTC
Applied as r19611

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


Navigation
Links