jayvdb added a comment.
After switching to need_right, I see the following tasks needed to completely remove the dualism:
1. allow config.usernames to be a list , and move sysopnames values into config.usernames with a deprecation warning. the test class flag 'sysop' can still be supported as a static check whether the list of usernames has two values, however it would be better to replace the sysop flag with a list of rights needed for the test. however a list of rights cant be a static check, as the userinfo needs to be loaded to check 2. allow site.login (or site.userlogin ?) to use a specific username (and maybe password- there is already a patch for this), which is then used, breaking the reliance on the config 3. remove LoginStatus.AS_SYSOP 4. change site.login to accept a list of rights needed, basically moving the process from need_right into login
They dont need to be done in that order, but that is how I would do it.
Some of this is playing on dangerous ground, as there are many bugs in the site login sequence.
TASK DETAIL https://phabricator.wikimedia.org/T71283
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: gerritbot, XZise, jayvdb, Ricordisamoa, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org