Class: Casbin::Effect::PriorityEffector
- Defined in:
- lib/casbin-ruby/effect/priority_effector.rb
Constant Summary
Constants inherited from Effector
Effector::ALLOW, Effector::DENY, Effector::INDETERMINATE
Instance Method Summary collapse
-
#final_effect(effects) ⇒ Object
returns the final effect based on the matched effects of the enforcer.
-
#intermediate_effect(effects) ⇒ Object
returns a intermediate effect based on the matched effects of the enforcer.
Instance Method Details
#final_effect(effects) ⇒ Object
returns the final effect based on the matched effects of the enforcer
17 18 19 20 21 22 |
# 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) ⇒ Object
returns a intermediate effect based on the matched effects of the enforcer
9 10 11 12 13 14 |
# 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 |