Class: Rushiro::AllowBasedControl

Inherits:
AccessControlHash show all
Defined in:
lib/rushiro/allow_based_control.rb

Instance Attribute Summary

Attributes inherited from AccessControlHash

#allows, #denies, #dirty, #original

Instance Method Summary collapse

Methods inherited from AccessControlHash

#add_permission, #initialize, #remove_permission, #serialize

Constructor Details

This class inherits a constructor from Rushiro::AccessControlHash

Instance Method Details

#permitted?(perm) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
6
# File 'lib/rushiro/allow_based_control.rb', line 3

def permitted?(perm)
  return false if !@dirty && @original.empty?
  @allows.permitted?(perm)
end