hubot-archive / hubot-auth

Assign roles to users and restrict command access in other scripts
149 stars 54 forks source link

Many improvements #6

Closed therealklanni closed 10 years ago

therealklanni commented 10 years ago

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.

therealklanni commented 10 years ago

Added 'who has X role' command, which reports all users having the named role.

therealklanni commented 10 years ago

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.

patcon commented 10 years ago

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 :)

therealklanni commented 10 years ago

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 .

patcon commented 10 years ago

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 :)

patcon commented 10 years ago

Again, thanks!

therealklanni commented 10 years ago

Sounds good. I was thinking of adding tests as well, but that's something for another day :P