[Mediawiki-api] Protection according to 'rights' or 'groups'

Bryan Tong Minh bryan.tongminh at gmail.com
Mon Jan 14 11:59:57 UTC 2008


Hello,

I have a question between the difference between rights and groups in
protection. When I request the protection of a page, for example
<http://commons.wikimedia.org/w/api.php?action=query&prop=info&inprop=protection&titles=Main%20Page>
the following is given for protection:

        <protection>
          <pr type="edit" level="autoconfirmed" expiry="infinity" />
          <pr type="move" level="sysop" expiry="infinity" />
        </protection>

When I ask my userinfo
<http://commons.wikimedia.org/w/api.php?action=query&prop=revisions&meta=userinfo&uiprop=rights|groups>:

    <userinfo name="Bryan">
      <groups>
        <g>checkuser</g>
        <g>sysop</g>
      </groups>
      <rights>
 [...]
        <r>autoconfirmed</r>
        <r>skipcaptcha</r>
        <r>emailconfirmed</r>
      </rights>
    </userinfo>

To abe able to edit the page, one needs to be 'autoconfirmed' which is
a right. In order to be able to move a page, one needs to be 'sysop'
which is a group. So can protection be set for both groups and rights?
I'm asking because I need to check in my framework whether there are
sufficient rights for an action.

Bryan



More information about the Mediawiki-api mailing list