Page MenuHomePhabricator

Use assertuser in Pywikibot
Closed, InvalidPublic

Description

Helpful to prevent accidental logged out edits.

Event Timeline

jayvdb created this task.Oct 6 2016, 5:08 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptOct 6 2016, 5:08 AM
Xqt added a subscriber: Xqt.Oct 9 2016, 11:02 AM

Isn't this already done by "assert=user"?
api.py has this line:

self["assert"] = 'user' # make sure user is logged in

Xqt closed this task as Invalid.Jul 14 2017, 12:02 PM
Anomie added a subscriber: Anomie.Jul 16 2017, 12:55 AM

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.