Page MenuHomePhabricator

Set user rights via API
Closed, ResolvedPublic

Description

Please add a user rights module to the API. A hypothetical query might look like this:
api.php

?action=rights
&user=Pathoschild
&token=foo+\\
&add=sysop|bureaucrat

Setting rights via API would be very useful for stewards (scraping forms with JavaScript is a pain).


Version: unspecified
Severity: enhancement

Details

Reference
bz15935

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:22 PM
bzimport set Reference to bz15935.

Bryan.TongMinh wrote:

Was previously in there but has been removed, since Brion did not want an extra entry point for user rights.

Re-opening this for now.

Looking through the API code history, I see r29244 (a revert by Brion that removed ApiChangeRights.php). In r32522 Roan removed the module from ApiMain.php.

However, I don't see any indication in either of those revs (or on this bug) that a WONTFIX is the best option here (or desired).

Making anyone rely on screen-scraping (God's curse on humanity) should be avoided in nearly every case.

If a user can delete, protect, block, etc. with the API, changing user rights doesn't seem like too large a step up. Re-opening for re-consideration and/or clarification.

herd wrote:

*** Bug 17825 has been marked as a duplicate of this bug. ***

(In reply to comment #4)

I withdraw my objection.

Great, I'll write a new userrights module then.

Reverted by Werdna in r48909 and r48910.

(In reply to comment #7)

Reverted by Werdna in r48909 and r48910.

Reapplied and issues addressed in r47890 and r47891

Yay, thanks (r48873, r48970, r48971, r48988, r49013, r49014, r49015).