Last modified: 2014-01-29 21:33:45 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 T61929, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59929 - Add CheckUser to the grants an OAuth consumer can use
Add CheckUser to the grants an OAuth consumer can use
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
OAuth (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-10 23:53 UTC by Dan Garry
Modified: 2014-01-29 21:33 UTC (History)
7 users (show)

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


Attachments

Description Dan Garry 2014-01-10 23:53:12 UTC
It'd be good if OAuth consumers could request the ability to use checkuser, so that tools could be built to analyse checkuser data.
Comment 1 Brad Jorsch 2014-01-13 14:45:05 UTC
This seems like a bug for Wikimedia / Site requests to have it added to $wgMWOAuthGrantPermissions in the config for WMF sites. Since checkuser isn't core MediaWiki, it seems awkward to have OAuth try to handle it.
Comment 2 Chris Steipp 2014-01-13 19:44:55 UTC
For a minimal implementation, just add $wgMWOAuthGrantPermissions['checkuser']['checkuser'] = true; into InitializeSettings.php, and make sure the message mwoauth-grant-checkuser gets defined in Ex:WikimediaMessages. The authorization screen will show the grant under the "Miscellaneous activity" grants group, which isn't too bad since the number of potential users is so small.
Comment 3 Brad Jorsch 2014-01-13 20:12:58 UTC
(In reply to comment #2)
> into InitializeSettings.php

Should that be CommonSettings.php, specifically somewhere in https://git.wikimedia.org/blob/operations%2Fmediawiki-config.git/3a1f34f81065764fb787e5290e916df44593c5fa/wmf-config%2FCommonSettings.php#L2523 ?
Comment 4 Kunal Mehta (Legoktm) 2014-01-22 02:11:08 UTC
(In reply to comment #1)
> This seems like a bug for Wikimedia / Site requests to have it added to
> $wgMWOAuthGrantPermissions in the config for WMF sites. Since checkuser isn't
> core MediaWiki, it seems awkward to have OAuth try to handle it.

I don't see why OAuth can't handle it. It's fine if extensions know about each other, so just do some kind of if class_exists( 'CheckUser' ) { load CU stuff; }
Comment 5 Brad Jorsch 2014-01-22 17:52:16 UTC
Because then you have a weird maze of different files to dig through to try to find where some setting is being set. When one extension needs some complex configuration based on the other then this might make sense, but for something simple like this I don't see it.

That particular suggestion would also depend on the ordering of the loading of the extensions, unless you're doing it in $wgExtensionFunctions which can have its own issues.
Comment 6 Kunal Mehta (Legoktm) 2014-01-22 18:21:38 UTC
(In reply to comment #5)
> Because then you have a weird maze of different files to dig through to try
> to
> find where some setting is being set. When one extension needs some complex
> configuration based on the other then this might make sense, but for
> something
> simple like this I don't see it.

I would just stick a comment saying # Note additional settings might be conditionally set in File.php

My expectation would be that if I have CheckUser and OAuth installed, it would just work, without requiring identical configuration that every wiki needs to set up. 

> 
> That particular suggestion would also depend on the ordering of the loading
> of
> the extensions, unless you're doing it in $wgExtensionFunctions which can
> have
> its own issues.

I was thinking that rather than functions using $wgMWOAuthGrantPermissions directly, you could have an intermediate function which adds the conditional ones. But I don't know the extension as well as you do, so I'll defer to your judgement :)
Comment 7 Brad Jorsch 2014-01-24 16:45:27 UTC
(In reply to comment #6)
> My expectation would be that if I have CheckUser and OAuth installed, it
> would
> just work, without requiring identical configuration that every wiki needs to
> set up. 

But then where do we stop? Why not have OAuth and JoesFabulousExtension "just work" too?

Also, while looking at bug 60392, I realized another problem here with regard to wiki farms: even if the other extension itself isn't enabled on a particular wiki, the configuration needs to be present on all of them or granting doesn't show up right. But if the extension isn't installed at all, we don't want to be dumping it in the config because it won't make sense.
Comment 8 Gerrit Notification Bot 2014-01-24 16:45:42 UTC
Change 109308 had a related patch set uploaded by Anomie:
Add checkuser OAuth group

https://gerrit.wikimedia.org/r/109308
Comment 9 Gerrit Notification Bot 2014-01-24 16:45:53 UTC
Change 109309 had a related patch set uploaded by Anomie:
Message for checkuser OAuth group

https://gerrit.wikimedia.org/r/109309
Comment 10 Gerrit Notification Bot 2014-01-24 18:24:44 UTC
Change 109309 merged by jenkins-bot:
Message for checkuser OAuth group

https://gerrit.wikimedia.org/r/109309
Comment 11 Gerrit Notification Bot 2014-01-28 23:54:59 UTC
Change 109308 merged by jenkins-bot:
Add checkuser OAuth group

https://gerrit.wikimedia.org/r/109308
Comment 12 Chris Steipp 2014-01-29 21:33:45 UTC
The grant is on the proposal form now. Thanks Brad!

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


Navigation
Links