UNPKG
hubot-aws
Version:
latest (0.6.2)
0.6.2
0.6.1
0.6.0
0.5.0
0.4.0
0.3.1
0.3.0
0.2.0
0.1.0
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
Hubot masters aws commands
github.com/yoheimuta/hubot-aws
yoheimuta/hubot-aws
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
}