Sha256: 531d080f6acdce7a9a2fafc387a1101d8cf3695fa7051e364c823337b2db35e2

Contents?: true

Size: 463 Bytes

Versions: 57

Compression:

Stored size: 463 Bytes

Contents

require "delegate"

module Ddr::Auth
  class LegacyRoles < SimpleDelegator

    def source
      adminMetadata.downloader
    end

    def to_roles
      source.each_with_object(Roles::DetachedRoleSet.new) do |agent, memo|
        memo.grant Roles::Role.build(type: Roles::DOWNLOADER, agent: agent, scope: Roles::RESOURCE_SCOPE)
      end
    end

    def clear
      source.clear
    end

    def inspect
      "DOWNLOADER: #{source.inspect}"
    end

  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
ddr-models-2.6.2 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.6.1 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.6.0 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.6.0.rc4 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.6.0.rc3 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.6.0.rc2 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.6.0.rc1 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.5.3 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.5.2 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.5.1 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.5.0 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.5.0.rc1 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.4.16 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.4.15 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.4.14 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.4.13 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.4.12 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.4.11 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.4.10 lib/ddr/auth/legacy/legacy_roles.rb
ddr-models-2.4.9 lib/ddr/auth/legacy/legacy_roles.rb