class Casbin::Effect::PriorityEffector

Public Instance Methods

final_effect(effects) click to toggle source

returns the final effect based on the matched effects of the enforcer

# File lib/casbin-ruby/effect/priority_effector.rb, line 17
def final_effect(effects)
  return ALLOW if effects.include?(ALLOW)
  return DENY if effects.include?(DENY)

  DENY
end
intermediate_effect(effects) click to toggle source

returns a intermediate effect based on the matched effects of the enforcer

# File lib/casbin-ruby/effect/priority_effector.rb, line 9
def intermediate_effect(effects)
  return ALLOW if effects.include?(ALLOW)
  return DENY if effects.include?(DENY)

  INDETERMINATE
end