Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hubot auth no longer works after upgrading "hubot-slack": "^4.0.0", #42

Closed
nsturnitin opened this issue Aug 2, 2016 · 9 comments
Closed

Comments

@nsturnitin
Copy link

Something changed and our hubot-auth logic no longer works.

eve deploy b78e275f9821a58e6249757faf3019f9274362c4 to production

Sorry, (user1) hasn't been added to the 'prod_deploy' role
An administrator has to approve you for this role using: eve user1 has prod_deploy role

eve who has prod_deploy role

@user1 The following people have the 'prod_deploy' role: user1, user2, user3

Here is the code I'm using in my script to evaluate if the user has a specific role:

if !robot.auth.hasRole(res.envelope.user, 'prod_deploy')
        res.send "Sorry, (#{res.message.user.name}) hasn't been added to the 'prod_deploy' role"
        res.send "An administrator has to approve you for this role using: eve #{res.message.user.name} has prod_deploy role"
        return

What am I doing wrong? Can someone please help, this is awfully frustrating to experience during a release.

@nsturnitin
Copy link
Author

nsturnitin commented Aug 3, 2016

@ceci-woodward can you please take a look at this? It's a production script and I really need to get it working asap. I can share my entire script if that may help, or maybe my hubot package.json has outdated. This happened after we updated slack-hubot.

@nsturnitin
Copy link
Author

{
"name": "eve",
"version": "0.0.1",
"private": true,
"author": "[email protected]",
"description": "ev teams hubot",
"dependencies": {
"bart": "0.0.3",
"chrono-node": "^1.2.1",
"forever": "^0.15.2",
"hubot": "^2.19.0",
"hubot-auth": "^1.3.0",
"hubot-bart": "^1.0.6",
"hubot-cron": "^0.2.9",
"hubot-diagnostics": "0.0.1",
"hubot-help": "^0.2.0",
"hubot-jenkins": "^1.0.2",
"hubot-redis-brain": "0.0.3",
"hubot-rules": "^0.1.1",
"hubot-slack": "^4.0.0",
"lodash": "^4.6.1",
"sha1-regex": "^1.0.0"
},
"engines": {
"node": "0.10.x"
}

@nsturnitin nsturnitin changed the title hubot auth no longer works hubot auth no longer works after upgrading "hubot-slack": "^4.0.0", Aug 3, 2016
@cecilia-sanare
Copy link

cecilia-sanare commented Aug 3, 2016

I'm guessing this is partially related to #37 and #36.

My suggestion would be to revert hubot-auth to version v1.2.0 and slack to v3.4.2 until #37, #36, and slackapi/hubot-slack#326 are resolved

As a side note, I don't have write-access to this repository.
So realistically all I can do is submit PRs like everyone else.

@Soulfire86
Copy link

+1

@cecilia-sanare
Copy link

I'll try to look into this sometime this week, although I don't really know what can be accomplished since it seems that slack heavily modified their hubot-slack api regarding users.

@nsturnitin
Copy link
Author

nsturnitin commented Aug 18, 2016

thanks Cecilia, could you let them know what you find? I eventually had to
downgrade my slackapi version and everything was back to normal. However, I
needed the new slackapi to overcome frequent disconnects.

On Thu, Aug 18, 2016 at 7:17 AM, Cecilia Woodward [email protected]
wrote:

I'll try to look into this sometime this week, although I don't really
know what can be accomplished since it seems that slack heavily modified
their hubot-slack api regarding users.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#42 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMgIe6WYIqSHVaMMehVrL2KAo25L2KQqks5qhGmNgaJpZM4Ja22I
.

sondremare added a commit to EdtechFoundry/hubot-auth that referenced this issue Aug 30, 2016
@comnam90
Copy link

comnam90 commented Jan 6, 2017

@sebastiandero
Copy link
Contributor

@comnam90 slackapi/hubot-slack#381
Fixed all the issues, is merged in 4.2.1

@cecilia-sanare
Copy link

Verified that this has been resolved.

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants