Class: PuavoRest::LegacyRole

Inherits:
LdapModel show all
Defined in:
resources/legacy_roles.rb

Constant Summary

Constant Summary

Constants inherited from LdapModel

LdapModel::ESCAPES, LdapModel::ESCAPE_RE, LdapModel::KRB_LOCK, LdapModel::PROF

Instance Attribute Summary

Attributes inherited from LdapModel

#ldap_attr_store, #serialize_attrs

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from LdapModel

#[], #[]=, _class_store, #add, #add_validation_error, after, all, #as_json, #assert_validation, base_filter, before, by_attr, by_attr!, by_dn, by_dn!, by_dn_array, by_id, by_id!, by_ldap_attr, by_ldap_attr!, callable_from_instance, #changed?, class_store, clear_setup, computed_attr, connection, #create!, create_connection, create_filter_lambda, #dirty?, dn_bind, #empty?, escape, filter, from_ldap_hash, #get_own, #get_raw, inherited, #initialize, is_dn, is_not_found?, ldap_attrs, ldap_map, #ldap_merge!, ldap_op, #ldap_set, #link, #merge, #new?, #object_model, organisation, organisation?, pretty_attrs_to_ldap, raw_by_dn, raw_filter, sasl_bind, #save!, search, search_filters, #set, settings, settings=, setup, skip_serialize, #to_hash, #to_json, #to_ldap_hash, #transform, #update!, #validate, #validate!, #validate_unique, #write_raw

Constructor Details

This class inherits a constructor from LdapModel

Class Method Details

+ (Object) ldap_base



13
14
15
# File 'resources/legacy_roles.rb', line 13

def self.ldap_base
  "ou=Roles,#{ organisation["base"] }"
end

Instance Method Details

- (Object) add_member(user)



17
18
19
20
# File 'resources/legacy_roles.rb', line 17

def add_member(user)
  add(:member_usernames, user.username)
  add(:member_dns, user.dn)
end