Page MenuHomePhabricator

ClosedWikiProvider should check whether the user has UltimateAuthority
Open, Needs TriagePublic

Description

It's very rarely needed but then it is quite annoying:

tgr@deploy2002:~$ mwscript-k8s --comment='T404334' --follow -- CentralAuth:createLocalAccount --wiki=aawiki TgrTest
⏳ Starting CentralAuth:createLocalAccount on Kubernetes as job mw-script.codfw.x4x144jf ...
🚀 Job is running.
📜 Streaming logs:
autoCreateUser failed for TgrTest:
Error: Automatic account creation is not allowed.

createLocalAccount.php uses UltimateAuthority, but ClosedWikiProvider checks account creation/autocreation rights via CentralAuthUser::hasGlobalPermission() which ignores that.

(Maybe CentralAuthUser should check the user's authority instead, but that seems like too much magic.)