Class: Entitlements::Plugins::GroupOfNames

Inherits:
Entitlements::Plugins show all
Includes:
Contracts::Core
Defined in:
lib/entitlements/plugins/group_of_names.rb

Constant Summary collapse

C =
::Contracts

Class Method Summary collapse

Methods included from Contracts::Core

common, extended, included

Methods inherited from Entitlements::Plugins

loaded?

Class Method Details

.override_hash(group, _plugin_config, ldap) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/entitlements/plugins/group_of_names.rb', line 17

def self.override_hash(group, _plugin_config, ldap)
  members = group.member_strings.map { |ms| ldap.person_dn_format.gsub("%KEY%", ms) }

  {
    "objectClass"  => "GroupOfNames",
    "member"       => members,
    "uniqueMember" => nil
  }
end