Class: Authorization::DevelopmentSupport::Analyzer::InheritingPrivilegesAnalyzer
Instance Method Summary
collapse
#analyze, #initialize
Instance Method Details
#analyze_rule(rule) ⇒ Object
117
118
119
|
# File 'lib/declarative_authorization/development_support/analyzer.rb', line 117
def analyze_rule (rule)
rule.privileges.any? {|privilege| rule.privileges.intersects?(privilege.ancestors) }
end
|
#message(object) ⇒ Object
121
122
123
|
# File 'lib/declarative_authorization/development_support/analyzer.rb', line 121
def message (object)
"At least one privilege inherits from another in this rule."
end
|