Closed therealklanni closed 10 years ago
Added 'who has X role' command, which reports all users having the named role.
New method userRoles
will get a consolidated list of roles (including "admin" if user's ID is in the env variable). Use this new method to improve responses and general functionality.
This looks awesome @therealklanni! Would you mind if I reverted the addition of the non-capturing groups? I know it's 100% correct, but it seems maybe a bit advanced for the sort of folks who tend to work with hubot scripts, so it makes it look much less intuitive :)
I guess you have a point there. If you think it's going to help comprehension then go ahead. :) On May 22, 2014 10:13 AM, "Patrick Connolly" notifications@github.com wrote:
This looks awesome @therealklanni https://github.com/therealklanni! Would you mind if I reverted the addition of the non-capturing groups? I know it's 100% correct, but it seems maybe a bit advanced for the sort of folks who tend to work with hubot scripts, so it makes it look much less intuitive :)
— Reply to this email directly or view it on GitHubhttps://github.com/hubot-scripts/hubot-auth/pull/6#issuecomment-43916988 .
Ok, cool! I'll merge, make that change, then run it in our hubot for a day or so (since we don't have tests. eep). I'll tag a release after we've used it for a bit :)
Again, thanks!
Sounds good. I was thinking of adding tests as well, but that's something for another day :P
Hubot can now respond to "what roles do I have" and the regular expression patterns have been improved. This also fixes a bug where if there is only one user with admin role and that user asks who has admin roles, the bot would erroneously respond there are no users with admin role.