Class: Caboose::RoleHandler

Inherits:
AccessHandler show all
Defined in:
lib/acl_system2/caboose/role_handler.rb

Instance Method Summary collapse

Methods included from LogicParser

#process

Instance Method Details

#check(key, context) ⇒ Object



14
15
16
# File 'lib/acl_system2/caboose/role_handler.rb', line 14

def check(key, context)  
  context[:user].roles.map{ |role| role.title.downcase}.include? key.downcase
end