Sha256: 25ba7376113f31ca677377b7bac35e982d31475e0615449698c6a98cf404815f

Contents?: true

Size: 557 Bytes

Versions: 57

Compression:

Stored size: 557 Bytes

Contents

module Ddr::Auth
  class LegacyPermissions < AbstractLegacyPermissions

    def source
      permissions
    end

    def role_type(access)
      case access
      when "discover"
        Roles::VIEWER
      when "read"
        Roles::VIEWER
      when "edit"
        Roles::EDITOR
      end
    end

    def scope
      Roles::RESOURCE_SCOPE
    end

    def clear
      rightsMetadata.clear_permissions!
      rightsMetadata.content = rightsMetadata.to_xml
    end

    def inspect
      "PERMISSIONS: #{source.map(&:to_hash).inspect}"
    end

  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
ddr-models-2.1.2 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.1.1 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.1.0 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.1.0.rc2 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.1.0.rc1 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.1 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.rc6 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.rc5 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.rc4 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.rc3 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.rc2 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.rc1 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.pre.5 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.pre.4 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.pre.3 lib/ddr/auth/legacy/legacy_permissions.rb
ddr-models-2.0.0.pre.2 lib/ddr/auth/legacy/legacy_permissions.rb