Added helper isRole().
This commit is contained in:
parent
141eda5f33
commit
b81c2ad04e
1 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,12 @@ class App.Controller extends Spine.Controller
|
|||
|
||||
@delay( a, 0 )
|
||||
|
||||
isRole: (name) ->
|
||||
return false if !window.Session.roles
|
||||
for role in window.Session.roles
|
||||
return true if role.name is name
|
||||
return false
|
||||
|
||||
# # extend delegateEvents to unbind and undelegate
|
||||
# delegateEvents: ->
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue