class Ddr::Auth::EffectivePermissions

Public Class Methods

call(obj, agents) click to toggle source

@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>]

# File lib/ddr/auth/effective_permissions.rb, line 8
def self.call(obj, agents)
  EffectiveRoles.call(obj, agents).map(&:permissions).flatten.uniq
end