Page MenuHomePhabricator

Use assertuser in Pywikibot
Closed, InvalidPublic

Description

Helpful to prevent accidental logged out edits.

Event Timeline

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

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

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.