Module: UCB::LDAP::GenericAttributes

Included in:
Person
Defined in:
lib/person/generic_attributes.rb

Instance Method Summary collapse

Instance Method Details

#addressesObject

Returns Array of Address for this Person. Requires a bind with access to addresses. See UCB::LDAP.authenticate().



42
43
44
# File 'lib/person/generic_attributes.rb', line 42

def addresses
  @addresses ||= Address.find_by_uid(uid)
end

#affiliate_affiliationsObject

Returns Array of Affiliation for this Person. Requires a bind with access to affiliations. See UCB::LDAP.authenticate().



35
36
37
# File 'lib/person/generic_attributes.rb', line 35

def affiliate_affiliations
  @affiliate_affiliations ||= Affiliation.find_by_uid(uid)
end

#emailObject



25
26
27
# File 'lib/person/generic_attributes.rb', line 25

def email
  mail.first
end

#firstnameObject Also known as: first_name



15
16
17
# File 'lib/person/generic_attributes.rb', line 15

def firstname
  givenname.first
end

#lastnameObject Also known as: last_name



20
21
22
# File 'lib/person/generic_attributes.rb', line 20

def lastname
  sn.first
end

#namespacesObject

Returns Array of Namespace for this Person. Requires a bind with access to namespaces. See UCB::LDAP.authenticate().



49
50
51
# File 'lib/person/generic_attributes.rb', line 49

def namespaces
  @namespaces ||= Namespace.find_by_uid(uid)
end

#phoneObject



29
30
31
# File 'lib/person/generic_attributes.rb', line 29

def phone
  telephoneNumber.first
end

#servicesObject

Returns Array of Service for this Person. Requires a bind with access to services. See UCB::LDAP.authenticate().



56
57
58
# File 'lib/person/generic_attributes.rb', line 56

def services
  @services ||= Service.find_by_uid(uid)
end

#test?Boolean

Returns true if the entry represents a test entry.

Returns:

  • (Boolean)


7
8
9
# File 'lib/person/generic_attributes.rb', line 7

def test?
  berkeleyEduTestIDFlag
end

#uidObject



11
12
13
# File 'lib/person/generic_attributes.rb', line 11

def uid
  super.first
end