Module: UCB::LDAP::CommonAttributes

Included in:
Person
Defined in:
lib/ucb_ldap/person/common_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().



63
64
65
66
# File 'lib/ucb_ldap/person/common_attributes.rb', line 63

def addresses
  warn "DEPRECATED: use postalAddress from a Person entry"
  []
end

#affiliate_affiliationsObject

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



40
41
42
# File 'lib/ucb_ldap/person/common_attributes.rb', line 40

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

#emailObject



26
27
28
# File 'lib/ucb_ldap/person/common_attributes.rb', line 26

def email
  mail.first
end

#firstnameObject Also known as: first_name



14
15
16
# File 'lib/ucb_ldap/person/common_attributes.rb', line 14

def firstname
  givenname.first
end

#lastnameObject Also known as: last_name



20
21
22
# File 'lib/ucb_ldap/person/common_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().



47
48
49
50
# File 'lib/ucb_ldap/person/common_attributes.rb', line 47

def namespaces
  warn "DEPRECATED: this is no longer supported by LDAP. This method will always return an empty Array"
  []
end

#officialemailObject



30
31
32
# File 'lib/ucb_ldap/person/common_attributes.rb', line 30

def officialemail
  berkeleyEduOfficialEmail.first
end

#phoneObject



34
35
36
# File 'lib/ucb_ldap/person/common_attributes.rb', line 34

def phone
  telephoneNumber.first
end

#servicesObject

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



55
56
57
58
# File 'lib/ucb_ldap/person/common_attributes.rb', line 55

def services
  warn "DEPRECATED: this is no longer supported by LDAP. This method will always return an empty Array"
  []
end

#test?Boolean

Returns true if the entry represents a test entry.

Returns:

  • (Boolean)


6
7
8
# File 'lib/ucb_ldap/person/common_attributes.rb', line 6

def test?
  berkeleyEduTestIDFlag
end

#uidObject



10
11
12
# File 'lib/ucb_ldap/person/common_attributes.rb', line 10

def uid
  super.first
end