Class: Tuersteher::ModelAccessRule

Inherits:
BaseAccessRule show all
Defined in:
lib/tuersteher.rb

Instance Attribute Summary

Attributes inherited from BaseAccessRule

#rule_spezifications

Instance Method Summary collapse

Methods inherited from BaseAccessRule

#deny, #deny?, #extension, #fired?, #grant, #method, #not, #right, #role, #roles

Constructor Details

#initialize(clazz) ⇒ ModelAccessRule

erzeugt neue Object-Zugriffsregel

clazz Model-Klassenname(als Class oder String) oder :all fuer alle



696
697
698
699
700
701
702
# File 'lib/tuersteher.rb', line 696

def initialize(clazz)
  raise "wrong clazz '#{clazz}'! Must be a Class/String or :all ." unless clazz==:all or clazz.is_a?(Class) or clazz.is_a?(String)
  super()
  if clazz != :all # :all is only syntax sugar
    @rule_spezifications << ModelSpecification.new(clazz, @negation)
  end
end

Instance Method Details

#to_sObject



705
706
707
# File 'lib/tuersteher.rb', line 705

def to_s
  @_to_s ||= super
end