Last modified: 2014-04-15 14:23:39 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 T62392, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60392 - Cannot use API action "wbsetlabel" on Wikidata via OAuth despite edit rights
Cannot use API action "wbsetlabel" on Wikidata via OAuth despite edit rights
Status: VERIFIED FIXED
Product: Wikimedia
Classification: Unclassified
Wikidata (Other open bugs)
wmf-deployment
All All
: High normal (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=0
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-24 09:27 UTC by Magnus Manske
Modified: 2014-04-15 14:23 UTC (History)
12 users (show)

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


Attachments

Description Magnus Manske 2014-01-24 09:27:28 UTC
I have an OAuth consumer that has edit rights on Wikidata:


Setting claims (action=wbcreateclaim) works just fine. However, action=wbsetlabel (using a copy of the working code) gets me:

stdClass Object ( [servedby] => mw1139 [error] => stdClass Object ( [code] => permissiondenied [info] => You do not have sufficient permissions ) ) 

As a user, I can edit labels manually, so I do have that right. And the API doc states that wbsetlabel needs edits rights, which both I and the consumer have.

So, that should work, but doesn't.

I'm marking this "blocker" because it blocks the function of one of my tools.
Comment 2 Brad Jorsch 2014-01-24 16:47:46 UTC
Not a bug in OAuth, it's just a configuration issue. What needs to happen in a patch against wmf-config/CommonSettings.php (in operations/mediawiki-config) that adds Wikidata's permissions into the appropriate subarrays of $wgMWOAuthGrantPermissions. 

Not being familiar with Wikidata's perimssions, I wouldn't know which ones should go in $wgMWOAuthGrantPermissions['useoauth'] (like core's 'read'), which should go in $wgMWOAuthGrantPermissions['editpage'] (like core's 'edit'), which should go in $wgMWOAuthGrantPermissions['createeditmovepage'] (like core's 'create' and 'move'), and so on, or whether one or more new groups should be created for some/all of them so clients can explicitly request "interact with Wikidata" (which would then need a message added to extension/WikimediaMessages).

Adjusting priority and importance to match bug 59929 and bug 59981, and reassigning to Wikimedia/Wikidata so the right people can decide how $wgMWOAuthGrantPermissions should be set up. Gerrit change #109308 might serve as an example as to where and how exactly to add it.
Comment 3 Gerrit Notification Bot 2014-01-24 20:18:45 UTC
Change 109333 had a related patch set (by Addshore) published:
Add wikibase permissions to MWOAuthGrantPermissions

https://gerrit.wikimedia.org/r/109333
Comment 4 Gerrit Notification Bot 2014-01-28 23:48:20 UTC
Change 109333 merged by jenkins-bot:
Add wikibase permissions to MWOAuthGrantPermissions

https://gerrit.wikimedia.org/r/109333
Comment 5 Magnus Manske 2014-02-03 09:36:10 UTC
Any news as to when this is going live?
Comment 6 Andre Klapper 2014-02-03 12:55:52 UTC
(In reply to comment #5)
> Any news as to when this is going live?

https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap
Comment 7 Lydia Pintscher 2014-02-03 13:16:37 UTC
@Magnus: It is merged and live. If it is still not working we need to investigate some more.
Comment 8 Magnus Manske 2014-02-03 13:35:50 UTC
(In reply to comment #7)
> @Magnus: It is merged and live. If it is still not working we need to
> investigate some more.

Still getting "You do not have sufficient permissions". Do the WiDaR consumer settings need to be updated on the OAuth side?
Comment 9 Lydia Pintscher 2014-02-03 13:38:25 UTC
I'm not sure. I'll try to find out.
Comment 10 tobias.gritschacher 2014-02-04 10:11:01 UTC
Will be discussed in weekly call on Thursday, Feb, 6th
Comment 11 Chris Steipp 2014-02-07 18:26:48 UTC
Magnus, can you use your OAuth consumer to run api.php?action=query&meta=userinfo&uiprop=blockinfo|groups|rights for the user? That will give a list of rights that the current user has, and we can start tracking down what is missing.
Comment 12 Magnus Manske 2014-02-07 18:42:00 UTC
Here it is:

[rights] => Array
	(
		[0] => read
		[1] => edit
		[2] => writeapi
		[3] => minoredit
		[4] => purge
		[5] => autopatrol
		[6] => autoconfirmed
		[7] => editsemiprotected
		[8] => skipcaptcha
	)

You can check for changes (if you make any) yourself:
http://tools.wmflabs.org/widar/?action=get_rights
Comment 13 Gerrit Notification Bot 2014-02-13 13:41:57 UTC
Change 113117 had a related patch set uploaded by Aude:
Fix OAuth rights for Wikidata

https://gerrit.wikimedia.org/r/113117
Comment 14 Magnus Manske 2014-03-26 08:50:58 UTC
Aaaand... bug is back. "You do not have sufficient permissions". Statement adding works fine.
Comment 15 Brad Jorsch 2014-03-26 15:15:29 UTC
Without any real looking into the issue, I'd suspect that the "deployment note" on Gerrit change #112470 wasn't taken care of.
Comment 16 Gerrit Notification Bot 2014-03-26 15:28:01 UTC
Change 121086 had a related patch set uploaded by Aude:
Update Wikidata OAuth grants

https://gerrit.wikimedia.org/r/121086
Comment 17 Aude 2014-03-26 15:29:33 UTC
hmmm, thought we already updated these settings but apparently not yet.

We shall do that now
Comment 18 Gerrit Notification Bot 2014-03-26 15:30:06 UTC
Change 121086 merged by jenkins-bot:
Update Wikidata OAuth grants

https://gerrit.wikimedia.org/r/121086
Comment 19 Aude 2014-03-26 15:32:28 UTC
@magnus please check that oauth works again.  I don't think there is any thing you need to update or do.
Comment 20 Magnus Manske 2014-03-26 22:19:11 UTC
Yep, works, thanks!

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


Navigation
Links