Page MenuHomePhabricator

API action=query&prop=info&intestactions=edit&intestactionsdetail=full and intestactionsdetail=boolean report that logged-out users can't edit pages when temp accounts are enabled
Closed, ResolvedPublic

Description

API action=query&prop=info&intestactions=edit&intestactionsdetail=full and intestactionsdetail=boolean report that logged-out users can't edit pages when temp accounts are enabled. They can actually edit through the magic of having a temp account created for them when needed.

For example:
https://de.wikipedia.beta.wmflabs.org/w/api.php?action=query&format=jsonfm&prop=info&titles=Test&formatversion=2&intestactions=edit&intestactionsdetail=full&intestactionsautocreate=1

"actions": {
    "edit": [
        {
            "code": "permissiondenied",
            "text": "The action you have requested is limited to users in one of the groups: [[Wikipedia:Benutzer|Benutzer]], [[Wikipedia:Temporäre Benutzer|Temporäre Benutzer]]."
        }
    ]
},

https://de.wikipedia.beta.wmflabs.org/w/api.php?action=query&format=jsonfm&prop=info&titles=Test&formatversion=2&intestactions=edit&intestactionsdetail=boolean&intestactionsautocreate=1

"actions": {
    "edit": false
},

Note that intestactionsdetail=quick and does not have this problem, it reports no restrictions:
https://de.wikipedia.beta.wmflabs.org/w/api.php?action=query&format=jsonfm&prop=info&titles=Test&formatversion=2&intestactions=edit&intestactionsdetail=quick&intestactionsautocreate=1

"actions": {
    "edit": []
},

Event Timeline

Change 970399 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] ApiQueryInfo: Fix permission checks while logged-out and temp users enabled

https://gerrit.wikimedia.org/r/970399

Change 970399 merged by jenkins-bot:

[mediawiki/core@master] ApiQueryInfo: Fix permission checks while logged-out and temp users enabled

https://gerrit.wikimedia.org/r/970399