Class: Rails::Auth::ACL::Matchers::AllowAll

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/auth/acl/matchers/allow_all.rb

Overview

Allows unauthenticated clients to access to a given resource

Instance Method Summary collapse

Constructor Details

#initialize(enabled) ⇒ AllowAll

Returns a new instance of AllowAll.



8
9
10
11
# File 'lib/rails/auth/acl/matchers/allow_all.rb', line 8

def initialize(enabled)
  fail ArgumentError, "enabled must be true/false" unless [true, false].include?(enabled)
  @enabled = enabled
end

Instance Method Details

#match(_env) ⇒ Object



13
14
15
# File 'lib/rails/auth/acl/matchers/allow_all.rb', line 13

def match(_env)
  @enabled
end