Sha256: a87826fb72953698d4f259addc980db06950e4c125405b01a48cbc0e2d1d1486

Contents?: true

Size: 696 Bytes

Versions: 32

Compression:

Stored size: 696 Bytes

Contents

module Ddr::Auth
  module Roles
    extend ActiveSupport::Autoload

    autoload :Role
    autoload :RoleAttribute
    autoload :RoleSet
    autoload :RoleSetManager
    autoload :RoleSetQuery
    autoload :RoleType
    autoload :RoleTypes
    autoload :RoleValidator

    include RoleTypes

    RESOURCE_SCOPE = "resource".freeze
    POLICY_SCOPE = "policy".freeze
    SCOPES = [RESOURCE_SCOPE, POLICY_SCOPE].freeze

    class << self
      def type_map
        @type_map ||= role_types.map { |role_type| [role_type.to_s, role_type] }.to_h
      end

      def role_types
        @role_types ||= RoleTypes.constants(false).map { |const| RoleTypes.const_get(const) }
      end
    end

  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
ddr-models-3.0.8 lib/ddr/auth/roles.rb
ddr-models-3.0.7 lib/ddr/auth/roles.rb
ddr-models-3.0.6 lib/ddr/auth/roles.rb
ddr-models-3.0.5 lib/ddr/auth/roles.rb
ddr-models-3.0.4 lib/ddr/auth/roles.rb
ddr-models-3.0.3 lib/ddr/auth/roles.rb
ddr-models-3.0.2 lib/ddr/auth/roles.rb
ddr-models-3.0.1 lib/ddr/auth/roles.rb
ddr-models-3.0.0 lib/ddr/auth/roles.rb
ddr-models-3.0.0.rc6 lib/ddr/auth/roles.rb
ddr-models-3.0.0.rc5 lib/ddr/auth/roles.rb
ddr-models-3.0.0.rc4 lib/ddr/auth/roles.rb
ddr-models-3.0.0.rc3 lib/ddr/auth/roles.rb
ddr-models-3.0.0.rc2 lib/ddr/auth/roles.rb
ddr-models-3.0.0.rc1 lib/ddr/auth/roles.rb
ddr-models-3.0.0.beta.22 lib/ddr/auth/roles.rb
ddr-models-3.0.0.beta.21 lib/ddr/auth/roles.rb
ddr-models-3.0.0.beta.20 lib/ddr/auth/roles.rb
ddr-models-3.0.0.beta.18 lib/ddr/auth/roles.rb
ddr-models-3.0.0.beta.17 lib/ddr/auth/roles.rb