Module: ZeroAuthorization::Engine::ClassMethods

Defined in:
lib/zero_authorization/engine.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorization_modeObject

Returns the value of attribute authorization_mode.



125
126
127
# File 'lib/zero_authorization/engine.rb', line 125

def authorization_mode
  @authorization_mode
end

Instance Method Details

#declared_methods_to_restrictObject



127
128
129
# File 'lib/zero_authorization/engine.rb', line 127

def declared_methods_to_restrict
  Role.methods_marked_for(self.name).keys
end

#list_of_methods_to_guardObject



131
132
133
# File 'lib/zero_authorization/engine.rb', line 131

def list_of_methods_to_guard
  declared_methods_to_restrict - [:create, :save, :update, :destroy, :anything, :nothing]
end