Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REST: Don't call login() on the root user
We've encountered a scenario in which creating edit tags via action.makeTag() failed after creating a bot user. The error message indicated that the tag was attempted to be created by the bot user, even though action.makeTag() is supposed to always create them using the root user, see: https://github.com/wikimedia/mediawiki-tools-api-testing/blob/f19ecd38750739907d14bf4a07bb20249a27407b/lib/action_clients.js#L26 It turns out that the issue was calling root.login(), which confusingly leads to the reference to the global root user singleton to be overridden with whatever account is logging in. This is solved here by simply logging in from a new anonymous user object instead of using the root user object. Change-Id: Ida293e426868b20afa57553bd39fa2eaa3c4e040
- Loading branch information