Helpful to prevent accidental logged out edits.
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Anomie | T146770 Add assertuser=Whomever to the API, to prevent accidentally performing requests as the wrong user | |||
Invalid | None | T147543 Use assertuser in Pywikibot |
Event Timeline
Comment Actions
Isn't this already done by "assert=user"?
api.py has this line:
self["assert"] = 'user' # make sure user is logged in
Comment Actions
To clarify: Both assert=user and assertuser=NAME will prevent logged-out edits. assertuser=NAME will also prevent edits if somehow logged in as any user other than NAME, which is useful in UI JavaScript in case the user re-logs-in to a different account in a different browser tab in the same session, but probably is not really necessary for pywikibot.