Added helper isRole().

This commit is contained in:
Martin Edenhofer 2012-09-04 18:36:20 +02:00
parent 141eda5f33
commit b81c2ad04e

View file

@ -20,6 +20,12 @@ class App.Controller extends Spine.Controller
@delay( a, 0 ) @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 # # extend delegateEvents to unbind and undelegate
# delegateEvents: -> # delegateEvents: ->
# #