Last modified: 2014-07-25 15:10:10 UTC
At the moment, if you try to become a tool that you are not a member of, the error message is rather cryptic: | scfc@tools-login:~$ become coursestats | sudo: sorry, a password is required to run sudo | scfc@tools-login:~$ Krinkle suggested in #wikimedia-labs that we test whether the user is a member of the tool and in that case provide a more meaningful message. If I'm not mistaken, we could also use that for the common: "You have to log out and in again!" case where the tool's members have been updated, but the user's session groups do not reflect that. I. e., if "getent group tools.$TOOL" shows the user as a member, but "groups" (?) doesn't show the tool's group, the user could be advised to log out and in again.
For testing, I just added myself to the coursestats tool /after/ logging into tools-login: | scfc@tools-login:~$ getent group tools.coursestats | tools.coursestats:*:52158:ragesoss,scfc | scfc@tools-login:~$ groups | wikidev project-bastion project-webtools project-project-proxy project-tools project-wikivoyage project-toolsbeta tools.admin tools.wikilint tools.dbreps tools.checkwiki tools.ext-mapsources-test tools.logger tools.templatecheck tools.typoscan tools.gerrit-reviewer-bot tools.ggu toolsbeta.test2 tools.meetbot tools.geodata tools.android-sdk-builds tools.blog tools.lighttpd-test tools.mediawiki-mirror tools.giraffe | scfc@tools-login:~$ So this appears to be a viable solution for the: "You have to log out and in again!" problem.
Change 147096 had a related patch set uploaded by Tim Landscheidt: become: Make more user-friendly https://gerrit.wikimedia.org/r/147096
Change 147096 merged by coren: become: Make more user-friendly https://gerrit.wikimedia.org/r/147096