UNPKG
shy-hubot-aws
Version:
latest (0.5.0)
0.5.0
Hubot masters aws commands
github.com/yoheimuta/hubot-aws
yoheimuta/hubot-aws
shy-hubot-aws
/
auth.coffee
15 lines
(11 loc)
•
292 B
text/coffeescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module.exports = { canAccess: (robot, user) ->
return
true
if
process.env.HUBOT_AWS_DEBUG
if
robot.auth.isAdmin(user)
return
true
role = process.env.HUBOT_AWS_CAN_ACCESS_ROLE
if
role && robot.auth.hasRole(user, role)
return
true
else
return
false
}