Lokal_Profil added a comment.

I think the main thing is to separate the user name and the login name, and thus separating the username from the suffix. I'm inclined to say that the '@suffix' API wasn't a great design -- the suffix should have been part of the password rather than the user name.

I'm inclined to agree. I think that is the gist of T139492.

As far as pywikibot is concerned, I would actually suggest to do that, at least conceptually. In user-config, we would just store the username, but in the passwordfile, we would store an object BotPassword('suffix', 'password') instead of just the password. (I'm not sure how this would map to manual logins, but those don't really make sense in the context of botpasswords anyway). This could then also extend to OAuth, where the password would be an OAuthAsPassword(...) object which stores the oauth data.

Conceptually that is quite nice since we make a clear distinction between username and login_name.

At the same time, I'm not sure how the botpassword support is currently implemented, but I think the password file is directly available to LoginManager, and LoginManager is the only one that needs to know the details of how the user is logging in.

After diving down the rabbit hole which logging in and passing around of the username is I think that re-gigging LoginManager to clearly separate uername and login_name and then have readPassword() overriding login_name with the suffixed username is probably the way forward.

That way we could also drop the BotPassword fix in check_user_exists.

I'm not sure I know the inner workings well enough to fix this myself though.


TASK DETAIL
https://phabricator.wikimedia.org/T143417

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lokal_Profil
Cc: valhallasw, Aklapper, Lokal_Profil, pywikibot-bugs-list, Mdupont, JJMC89, jayvdb
_______________________________________________
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to