Sha256: eef816aa2327c22754c1cbb7e6aadde0400a1bc25e264aec472c9168b7de1ae4
Contents?: true
Size: 351 Bytes
Versions: 2
Compression:
Stored size: 351 Bytes
Contents
module Ddr module Managers class RoleManager attr_reader :object def initialize(object) @object = object end def principal_has_role?(principal, role) ( principals(role) & Array(principal) ).any? end def principals(role) object.adminMetadata.send(role) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ddr-models-1.8.1 | lib/ddr/managers/role_manager.rb~ |
ddr-models-1.8.0 | lib/ddr/managers/role_manager.rb~ |