Class: Shamu::Security::NoPolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/shamu/security/no_policy.rb

Overview

Used in specs and service to service delegated requests to effectively offer no policy and permit all actions.

Instance Method Summary collapse

Instance Method Details

#permit?:yes, ...

Determines if the given action may be performed on the given resource.

Parameters:

  • action (Symbol)

    to perform.

  • resource (Object)

    the resource the action will be performed on.

  • additional_context (Object)

    that the policy may consider.

Returns:

  • (:yes, :maybe, false)

    a truthy value if permitted, otherwise false. The truthy value depends on the certainty of the policy. A value of :yes or true indicates the action is always permitted. A value of :maybe indicates the action is permitted but the user may need to present additional credentials such as logging on this session or entering a TFA code.



9
10
11
# File 'lib/shamu/security/no_policy.rb', line 9

def permit?( * )
  :yes
end