Sha256: 5c81c64091a1de78ffc7c61a71c6c8d58fd9b21307b4935b767f51be300f9ccd

Contents?: true

Size: 361 Bytes

Versions: 6

Compression:

Stored size: 361 Bytes

Contents

# frozen_string_literal: true

module Rails
  module Auth
    # Rails constraint to make sure the ACLs have been installed
    class InstalledConstraint
      def initialize(config = Rails.application)
        @config = config
      end

      def matches?(_request)
        @config.middleware.include?(Rails::Auth::ACL::Middleware)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails-auth-3.2.0 lib/rails/auth/installed_constraint.rb
rails-auth-3.1.0 lib/rails/auth/installed_constraint.rb
rails-auth-3.0.0 lib/rails/auth/installed_constraint.rb
rails-auth-2.2.2 lib/rails/auth/installed_constraint.rb
rails-auth-2.2.1 lib/rails/auth/installed_constraint.rb
rails-auth-2.2.0 lib/rails/auth/installed_constraint.rb