Sha256: b37fc2dc959d46e12bdf098b2ed9d0d90f3a61e2df54d4f90a45a73bd75e6ee5

Contents?: true

Size: 251 Bytes

Versions: 36

Compression:

Stored size: 251 Bytes

Contents

module Ddr::Auth
  class EffectiveRoles

    def self.call(obj, agents = nil)
      ( obj.roles | obj.inherited_roles ).tap do |roles|
        if agents
          roles.select! { |r| agents.include?(r.agent) }
        end
      end
    end

  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ddr-core-1.17.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.16.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.15.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.14.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.13.2 lib/ddr/auth/effective_roles.rb
ddr-core-1.13.1 lib/ddr/auth/effective_roles.rb
ddr-core-1.13.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.12.2 lib/ddr/auth/effective_roles.rb
ddr-core-1.12.1 lib/ddr/auth/effective_roles.rb
ddr-core-1.12.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.11.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.10.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.9.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.8.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.7.0 lib/ddr/auth/effective_roles.rb
ddr-core-1.6.6 lib/ddr/auth/effective_roles.rb
ddr-core-1.6.5 lib/ddr/auth/effective_roles.rb
ddr-core-1.6.4 lib/ddr/auth/effective_roles.rb
ddr-core-1.6.3 lib/ddr/auth/effective_roles.rb
ddr-core-1.6.2 lib/ddr/auth/effective_roles.rb