Exception: AnnotationSecurity::RuleError

Inherits:
SecurityError show all
Defined in:
lib/annotation_security/exceptions.rb

Overview

AnnotationSecurity::RuleError

Will be raised if a right or relation is defined twice or has an invalid name.

Direct Known Subclasses

RuleExecutionError, RuleNotFoundError

Class Method Summary collapse

Class Method Details

.defined_twice(type, rule) ⇒ Object

:nodoc:



70
71
72
# File 'lib/annotation_security/exceptions.rb', line 70

def self.defined_twice(type,rule) # :nodoc:
  new "The #{type} #{rule} is defined twice"
end

.forbidden_name(type, rule) ⇒ Object

:nodoc:



74
75
76
# File 'lib/annotation_security/exceptions.rb', line 74

def self.forbidden_name(type,rule) # :nodoc:
  new "#{rule} is not allowed as #{type} name"
end