Page MenuHomePhabricator

API : include add/remove permissions associated with user groups
Closed, ResolvedPublic

Description

Author: matthew.britton

Description:
At the moment, one can use meta=userinfo&uiprop=changeablegroups to determine which groups the current user can add/remove.

<userinfo>
  <changeablegroups>
    <add>
      <g>bot</g>
    </add>
    <remove>
      <g>bot</g>
    </remove>
    <add-self />
    <remove-self />
  </changeablegroups>
</userinfo>

However, meta=siteinfo&siprop=usergroups only lists the rights associated with each group. Thus there is no way to see which add/remove permissions are granted by groups you are not in.

<group name="sysop">
  <rights>
    <permission>block</permission>
    <permission>createaccount</permission>
    <permission>delete</permission>
    
    ...

  </rights>
</group>

Contrast this with [[Special:ListGroupRights]], which as well as the rights of each group also lists what the group members can add/remove.

One way to address this would be to include "add", "remove", "add-self" and "remove-self" nodes in the output of siprop=usergroups, as is done with uiprop=changeablegroups, e.g.

<group name="sysop">
  <rights>
    <permission>block</permission>
    <permission>createaccount</permission>
    <permission>delete</permission>
    
    ...

  </rights>
  <add>
      <g>bot</g>
  </add>
  <remove>
      <g>bot</g>
  </remove>
  <add-self />
  <remove-self />
</group>

Version: unspecified
Severity: enhancement

Details

Reference
bz24236

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:11 PM
bzimport set Reference to bz24236.