Last modified: 2014-07-25 15:10:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70156, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68156 - become should complain more clearly if the user is not (in this session) a member of the tool
become should complain more clearly if the user is not (in this session) a me...
Status: PATCH_TO_REVIEW
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Tim Landscheidt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-17 11:00 UTC by Tim Landscheidt
Modified: 2014-07-25 15:10 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tim Landscheidt 2014-07-17 11:00:21 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.
Comment 1 Tim Landscheidt 2014-07-17 11:39:33 UTC
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.
Comment 2 Gerrit Notification Bot 2014-07-17 12:37:59 UTC
Change 147096 had a related patch set uploaded by Tim Landscheidt:
become: Make more user-friendly

https://gerrit.wikimedia.org/r/147096
Comment 3 Gerrit Notification Bot 2014-07-25 15:10:10 UTC
Change 147096 merged by coren:
become: Make more user-friendly

https://gerrit.wikimedia.org/r/147096

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links