lib/declarative_authorization/controller/runtime.rb
def has_any_role?(*roles)
        user_roles = authorization_engine.roles_for(current_user)
        result = roles.any? do |role|
          user_roles.include?(role)
        end
        yield if result and block_given?
        result
      end
# Intended to be used where you want to allow users with any single listed role to view
# the content in question
Intended to be used where you want to allow users with any single listed role to view
the content in question
Intended to be used where you want to allow users with any single listed role to view the content in question
def has_any_role?(*roles)
        user_roles = authorization_engine.roles_for(current_user)
        result = roles.any? do |role|
          user_roles.include?(role)
        end
        yield if result and block_given?
        result
      end
def has_any_role? ( * roles ) user_roles = authorization_engine . roles_for ( current_user ) result = roles . any? do | role | user_roles . include? ( role ) end yield if result and block_given? result end
Intended to be used where you want to allow users with any single listed role to view
the content in question
Intended to be used where you want to allow users with any single listed role to view the content in question
roles