hubot-archive / hubot-auth

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

Add a more general environment variable for adding a static set of roles #32

Closed cecilia-sanare closed 8 years ago

cecilia-sanare commented 8 years ago

Closes #31

patcon commented 8 years ago

Nice! Any way we could easily make this backward compat so that it's not going to break hubot-auth for everyone using the current method? If we don't feel like being empathetic to those people, we could just do a major version bump next release, I suppose :)

cecilia-sanare commented 8 years ago

It still supports using HUBOT_AUTH_ADMIN, it just will output a warning letting developers know its deprecated.

cecilia-sanare commented 8 years ago

ping @patcon

patcon commented 8 years ago

Released in v1.3.0! Thanks! :fireworks:

rambo45 commented 7 years ago

I have set the environment variable properly bu it fails with this error: ERROR Unable to load /opt/bot/node_modules/hubot-auth/src/auth: TypeError: Cannot read property '0' of null at module.exports (/opt/bot/node_modules/hubot-auth/src/auth.coffee:48:36, :35:70) at Robot.loadFile (/opt/bot/node_modules/hubot/src/robot.coffee:358:11, :226:13) at /opt/bot/node_modules/hubot-auth/index.coffee:12:11, :26:33 at FSReqWrap.cb [as oncomplete] (fs.js:240:19)

patcon commented 7 years ago

Ah, shoot, sorry that it's giving you trouble @rambo45. I think you'll always have better luck getting a response from someone if you open a new issue. Maintainers usually like issues to be about one thing at a time :)

benzvan commented 6 years ago

I think I ran into similar problems trying to implement a similar feature. I tried to append role info to the existing hubot users, but I think it got overwritten when hubot connected to slack. I ended up creating my own auth plugin that uses hubot-auth but stores roles in a separate dictionary in the brain.