Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"grunt-contrib-watch": "~0.5.3",
"grunt-mocha-test": "~0.7.0",
"grunt-release": "~0.6.0",
"hubot": "^2.7.5",
"hubot": "^2.15.0",
"hubot-mock-adapter": "^1.0.0",
"matchdep": "~0.1.2",
"mocha": "*"
Expand Down
4 changes: 4 additions & 0 deletions src/auth.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ config =
admin_list: process.env.HUBOT_AUTH_ADMIN

module.exports = (robot) ->
robot.listenerMiddleware (context, next, done) ->
context.response.message.user.groups = (cb) ->
cb(robot.auth.userRoles(context.response.message.user))
next()

Choose a reason for hiding this comment

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

This requires at least v2.15.0.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks! Updated package.json to require "^2.15.0".


unless config.admin_list?
robot.logger.warning 'The HUBOT_AUTH_ADMIN environment variable not set'
Expand Down