hubot-archive / hubot-auth

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

Add "isAdmin" method #10

Closed eruizdechavez closed 10 years ago

eruizdechavez commented 10 years ago

I am starting to work with Hubot and while testing for roles I figured out there was no way to test if a user requesting an action as or was not an admin, so I added an isAdmin method and replaced a couple if checks (adding and removing roles) to use it instead.

Test cases are passing fine after the change.

patcon commented 10 years ago

Rockin! I suppose the existing tests cover this well enough. Thanks! I'll release in v1.1.1

eruizdechavez commented 10 years ago

Good to see it is not only useful for me :+1:

Thanks for the quick merge!