Sha256: 2e769a2bb58928caa0023fc1def026902ad6ca1c2f9d8436b0e2660ff12179d7

Contents?: true

Size: 375 Bytes

Versions: 82

Compression:

Stored size: 375 Bytes

Contents

require "delegate"

module Ddr::Auth
  class ResourceRoles < SimpleDelegator

    # @param obj [Object] an object that receives :roles and returns a RoleSet
    # @return [Ddr::Auth::Roles::RoleSetQuery]
    def self.call(obj)
      new(obj).call
    end

    # @return [Ddr::Auth::Roles::DetachedRoleSet]
    def call
      roles.in_resource_scope.detach
    end

  end
end

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
ddr-models-2.4.8 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.7 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.6 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.5 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.4 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.3 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.2 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.1 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.0 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.0.rc6 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.0.rc5 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.0.rc4 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.0.rc3 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.0.rc2 lib/ddr/auth/resource_roles.rb
ddr-models-2.4.0.rc1 lib/ddr/auth/resource_roles.rb
ddr-models-2.3.2 lib/ddr/auth/resource_roles.rb
ddr-models-2.3.1 lib/ddr/auth/resource_roles.rb
ddr-models-3.0.0.alpha.4 lib/ddr/auth/resource_roles.rb
ddr-models-3.0.0.alpha.3 lib/ddr/auth/resource_roles.rb
ddr-models-2.3.0 lib/ddr/auth/resource_roles.rb