Last modified: 2014-01-25 12:47:00 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 T60602, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58602 - Special:GWToolset does not check permissions correctly
Special:GWToolset does not check permissions correctly
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GWToolset (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-17 22:31 UTC by Ryan Kaldari
Modified: 2014-01-25 12:47 UTC (History)
6 users (show)

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


Attachments

Description Ryan Kaldari 2013-12-17 22:31:02 UTC
It appears that Special:GWToolset is checking for membership in the gwtoolset user group rather than checking for the actual gwtoolset user right. So, for example, an admin that has the gwtoolset user right, but isn't in the gwtoolset user group will not be given access to Special:GWToolset.
Comment 1 Tomasz W. Kozlowski 2013-12-17 22:39:57 UTC
The short discussion on #wikimedia-commons leads me to believe that the access to the tool should indeed by controlled by user rights rather than user groups.
Comment 2 dan 2013-12-18 22:51:31 UTC
similar to:
- bug 58603
- bug 58607

those bugs have been committed to commons and seem to have resolved the initial ‘right’ issue admins were experiencing. it is true that the extension is using the group and not the right to determine access to the extension, but this is by design.

there is currently a discussion at https://commons.wikimedia.org/wiki/Commons:Administrators%27_noticeboard#GWToolset regarding who should actually have the ability to add/remove this group from a user’s account. once that has been decided the necessary config changes can be made.
Comment 3 Tomasz W. Kozlowski 2013-12-18 23:01:24 UTC
These are all unrelated things, Dan.

It is my understanding that extensions should generally use user rights rather than user groups to determine access (after watching a discussion between kaldari and Reedy on #wikimedia-whatever). 

In this particular case, there is little difference because the gwtoolset user group is the only one which has the gwtoolset user right (at least in the Wikimedia universe), but I think it's now more about code quality and conventions as well as about the third-party potential.

The discussion on Commons is irrelevant to this; we're talking about the extension code, not about local per-wiki settings, which from now on will be defined in <https://noc.wikimedia.org/conf/highlight.php?file=InitialiseSettings.php>, and not directly in the extension as it was before bug 58607 got fixed.
Comment 4 Bawolff (Brian Wolff) 2013-12-19 01:31:28 UTC
(In reply to comment #3)

> In this particular case, there is little difference because the gwtoolset
> user
> group is the only one which has the gwtoolset user right (at least in the
> Wikimedia universe), but I think it's now more about code quality and
> conventions as well as about the third-party potential.

Yes, MediaWiki is designed under the assumption that groups are for organization only, and a group does not give extra abilities to the user except for whatever rights are contained in the group. There should be no difference between someone in the gwtoolset group and somebody in another group with a different name and the same rights.
Comment 5 dan 2013-12-19 09:15:23 UTC
okay, i think i understand this issue better now.

  • our use case is to only allow certain users access to the extension.

in order to achieve this i originally thought that i needed to add a new group and then test against that new group.

what i understand now is that i need to add a new group, and a new right, which have already been done, and test against the new right only. only users who are part of this new group, gwtoolset, will have the right, gwtoolset assigned to them and thus access to the extension. is this what this bug is getting at?
Comment 6 Bawolff (Brian Wolff) 2013-12-19 19:35:22 UTC
(In reply to comment #5)
> okay, i think i understand this issue better now.
> 
>   • our use case is to only allow certain users access to the extension.
> 
> in order to achieve this i originally thought that i needed to add a new
> group
> and then test against that new group.
> 
> what i understand now is that i need to add a new group, and a new right,
> which
> have already been done, and test against the new right only. only users who
> are
> part of this new group, gwtoolset, will have the right, gwtoolset assigned to
> them and thus access to the extension. is this what this bug is getting at?


Yep
Comment 7 Gerrit Notification Bot 2013-12-19 21:05:20 UTC
Change 102814 had a related patch set uploaded by Dan-nl:
correcting gwtoolset permission check

https://gerrit.wikimedia.org/r/102814
Comment 8 Gerrit Notification Bot 2013-12-23 19:08:47 UTC
Change 102814 merged by Dan-nl:
correcting gwtoolset permission check

https://gerrit.wikimedia.org/r/102814
Comment 9 MZMcBride 2013-12-30 03:19:53 UTC
(In reply to comment #8)
> Change 102814 merged by Dan-nl:
> correcting gwtoolset permission check
> 
> https://gerrit.wikimedia.org/r/102814

Is this bug resolved/fixed, then?
Comment 10 dan 2014-01-08 20:40:19 UTC
ryan,

the patch has been merged into the master branch and deployed to Commons. 
you can see the results when you are not logged into commons and go to 
http://commons.wikimedia.org/wiki/Special:GWToolset.

please close this ticket if you’re satisfied with the results. if not, please
indicate what else needs to be addressed.
Comment 11 Tomasz W. Kozlowski 2014-01-25 12:47:00 UTC
This bug appears to have been fixed; the extension now checks whether the user in question has the 'gwtoolset' user right instead of checking for their membership in the 'gwtoolset' user group. Please feel to reopen if you don't like it.

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


Navigation
Links