Class: Rushiro::DenyBasedControl

Inherits:
AccessControlHash show all
Defined in:
lib/rushiro/deny_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
7
# File 'lib/rushiro/deny_based_control.rb', line 3

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