Module: UCB::LDAP::CommonAttributes
- Included in:
- Person
- Defined in:
- lib/ucb_ldap/person/common_attributes.rb
Instance Method Summary collapse
-
#addresses ⇒ Object
Returns
Array
of Address for this Person. -
#affiliate_affiliations ⇒ Object
Returns
Array
of Affiliation for this Person. - #email ⇒ Object
- #firstname ⇒ Object (also: #first_name)
- #lastname ⇒ Object (also: #last_name)
-
#namespaces ⇒ Object
Returns
Array
of Namespace for this Person. - #officialemail ⇒ Object
- #phone ⇒ Object
-
#services ⇒ Object
Returns
Array
of Service for this Person. -
#test? ⇒ Boolean
Returns
true
if the entry represents a test entry. - #uid ⇒ Object
Instance Method Details
#addresses ⇒ Object
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_affiliations ⇒ Object
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 |
#email ⇒ Object
26 27 28 |
# File 'lib/ucb_ldap/person/common_attributes.rb', line 26 def email mail.first end |
#firstname ⇒ Object Also known as: first_name
14 15 16 |
# File 'lib/ucb_ldap/person/common_attributes.rb', line 14 def firstname givenname.first end |
#lastname ⇒ Object Also known as: last_name
20 21 22 |
# File 'lib/ucb_ldap/person/common_attributes.rb', line 20 def lastname sn.first end |
#namespaces ⇒ Object
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 |
#officialemail ⇒ Object
30 31 32 |
# File 'lib/ucb_ldap/person/common_attributes.rb', line 30 def officialemail berkeleyEduOfficialEmail.first end |
#phone ⇒ Object
34 35 36 |
# File 'lib/ucb_ldap/person/common_attributes.rb', line 34 def phone telephoneNumber.first end |
#services ⇒ Object
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.
6 7 8 |
# File 'lib/ucb_ldap/person/common_attributes.rb', line 6 def test? berkeleyEduTestIDFlag end |
#uid ⇒ Object
10 11 12 |
# File 'lib/ucb_ldap/person/common_attributes.rb', line 10 def uid super.first end |