Page MenuHomePhabricator

API error editing wiki with edit restrictions
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):
Attempt to use API to make edits on foundation.wikimedia.org (in this case - via pywikibot via hub-paws

What happens?:
Encounter this error, regardless of permissions of account attempting to make edits: "WARNING: API error protectednamespace: You do not have permission to edit pages in the XYZ namespace."

What should have happened instead?:
API edits allowed based on permissions on wiki for account.

Event Timeline

Have tested using both a bot and regular accounts that otherwise have valid edit permissions - but not able to use API to make the edits.

I'm guessing this is possibly related to the OAuth grants paws is using... And "Edit protected pages" hasn't been selected?

I'm guessing this is possibly related to the OAuth grants paws is using... And "Edit protected pages" hasn't been selected?

Correct. Editing most foundationwiki pages requires the edit-legal right, which is assigned to the Edit protected page grant (cf. Special:ListGrants) and PAWS app does not have that grant assigned.

So, this can be fixed by reissuing the OAuth credentials and adding the new grant. FTR, the current consumer is owned by @rook.

I don't see any problems with adding this grant to PAWS. I take it no one here does either?

I don't see any problems with adding this grant to PAWS. I take it no one here does either?

Edit protected pages is IMO OK. I wouldn't be sure about the ability to edit CSS/JS (might be too much for PAWS), but Edit protected pages doesn't include that.

Urbanecm assigned this task to rook.

Thanks @rook and others! I verified this via an edit on foundationwiki, and it seems to work!

@Varnent Closing this task, as the issue seems to be resolved, but feel free to reopen if it still doesn't work for you. Please note you might need to log out and then log in again for the change to take effect.

@Urbanecm just checked and this is now working as expected! Thank you for the quick assist!