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

Static roles will no longer get wiped out after hubot initializes #38

Closed
wants to merge 1 commit into from
Closed

Conversation

cecilia-sanare
Copy link

@cecilia-sanare cecilia-sanare commented Jul 14, 2016

Assigning roles to a user on startup caused hubot brain to add users with invalid ids/names and add the roles to said user. The only reason the tests didn't fail is due to the id and name being the same in all cases.

note: the reason I didn't add/update any test cases is due to hubot-test-helper not supporting custom ids.

Fixes #36 and fixes #37

Verified in Slack:
image

@cecilia-sanare
Copy link
Author

cecilia-sanare commented Jul 15, 2016

ping @patcon

@ferrari @alexleigh @lwhitworth
This should fix your issue, but feel free to install hubot-auth via my fork and verify.

$ npm i ceci-woodward/hubot-auth -S

@vamsee
Copy link

vamsee commented Jul 22, 2016

Anyone know when this will get merged? Currently I'm having to checkout from git for each deploy. The current release definitely broken.

dberzano pushed a commit to dberzano/alihubot that referenced this pull request Jul 27, 2016
storedRoles = robot.brain.get('roles')
unless storedRoles
robot.brain.set('roles', {})
storedRoles = robot.brain.get('roles')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I have just noticed that this part loads data without making sure the brain connection was established. In my case I am using a Redis brain and the connection occurs after robot.brain.get(). The net result is that I lose stored roles.

@cecilia-sanare
Copy link
Author

This shouldn't be merged due to it breaking backwards compatability

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

Successfully merging this pull request may close these issues.

admin role did not assigned correctly on 1.3.0 hubot-auth just won't work for me
3 participants