Sha256: 95992484f0027df71c53eec80558290743a6fe87f90e2fc03c57cb822496a28d

Contents?: true

Size: 474 Bytes

Versions: 1

Compression:

Stored size: 474 Bytes

Contents

module Rails
  module Auth
    class ACL
      # Built-in predicate matchers
      module Matchers
        # Allows unauthenticated clients to access to a given resource
        class AllowAll
          def initialize(enabled)
            fail ArgumentError, "enabled must be true/false" unless [true, false].include?(enabled)
            @enabled = enabled
          end

          def match(_env)
            @enabled
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails-auth-0.2.0 lib/rails/auth/acl/matchers/allow_all.rb