Sha256: 24dc795517c151a7aa333395f86fd3a568dc7e0db0dc14a64cbaa3005b675dbb

Contents?: true

Size: 377 Bytes

Versions: 40

Compression:

Stored size: 377 Bytes

Contents

module Ddr::Auth
  class EffectivePermissions

    # @param obj [Object] an object that receives :roles and returns an Array
    # of Ddr::Auth::Roles::Role.
    # @param agents [String, Array<String>] agent(s) to match roles
    # @return [Array<Symbol>]
    def self.call(obj, agents)
      EffectiveRoles.call(obj, agents).map(&:permissions).flatten.uniq
    end

  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

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