UNPKG
authorizedjs
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
A tool for authorization based on permits
fagbokforlaget/authorizedjs
authorizedjs
/
lib
/
permit.coffee
8 lines
(6 loc)
•
155 B
text/coffeescript
View Raw
1
2
3
4
5
6
7
8
class
Permit
constructor
: (
@user
) -> call: (action, resource) ->
return
@[action](resource)
if
@[action]
return
false
module.exports = Permit