Class: UCB::LDAP::Service
- Inherits:
-
Entry
- Object
- Entry
- UCB::LDAP::Service
show all
- Defined in:
- lib/ucb_ldap_service.rb
Overview
UCB::LDAP::Service
This class models a person’s service entries in the UCB LDAP directory.
services = Services.find_by_uid("1234")
Servicess are usually loaded through a Person instance:
p = Person.find_by_uid("1234") services = p.services
Note on Binds
You must have a privileged bind and pass your credentials to UCB::LDAP.authenticate() before performing your Service search.
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Entry
#assigned_attributes, #attributes, canonical, #canonical, combine_filters, create, create!, #delete, #delete!, #dn, entity_name, find_by_dn, #initialize, make_search_filter, #method_missing, #modify, #modify_operations, #net_ldap, net_ldap, object_classes, required_attributes, required_schema_attributes, schema_attribute, schema_attributes_array, schema_attributes_hash, search, set_schema_attributes, #setter_method?, tree_base, tree_base=, unique_object_class, #update_attributes, #update_attributes!, #value_getter, #value_setter
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class UCB::LDAP::Entry
Class Method Details
.find_by_uid(uid) ⇒ Object
Returns an Array of JobAppointment for uid
, sorted by record_number(). Returns an empty Array ([]) if nothing is found.
103
104
105
106
107
|
# File 'lib/ucb_ldap_service.rb', line 103
def find_by_uid(uid)
base = "uid=#{uid},ou=people,dc=berkeley,dc=edu"
filter = Net::LDAP::Filter.eq("objectclass", 'berkeleyEduPersonService')
search(:base => base, :filter => filter)
end
|
Instance Method Details
#common_name ⇒ Object
89
90
91
|
# File 'lib/ucb_ldap_service.rb', line 89
def common_name
cn
end
|
#description ⇒ Object
93
94
95
|
# File 'lib/ucb_ldap_service.rb', line 93
def description
super.first
end
|
#eligible_by ⇒ Object
25
26
27
|
# File 'lib/ucb_ldap_service.rb', line 25
def eligible_by
berkeleyEduPersonServiceEligibleBy
end
|
#eligible_date ⇒ Object
29
30
31
|
# File 'lib/ucb_ldap_service.rb', line 29
def eligible_date
berkeleyEduPersonServiceEligibleDate
end
|
#end_date ⇒ Object
37
38
39
|
# File 'lib/ucb_ldap_service.rb', line 37
def end_date
berkeleyEduPersonServiceEndDate
end
|
#ended_by ⇒ Object
33
34
35
|
# File 'lib/ucb_ldap_service.rb', line 33
def ended_by
berkeleyEduPersonServiceEndBy
end
|
#entered_by ⇒ Object
41
42
43
|
# File 'lib/ucb_ldap_service.rb', line 41
def entered_by
berkeleyEduPersonServiceEnteredBy
end
|
#entered_date ⇒ Object
45
46
47
|
# File 'lib/ucb_ldap_service.rb', line 45
def entered_date
berkeleyEduPersonServiceEnteredDate
end
|
#level ⇒ Object
49
50
51
|
# File 'lib/ucb_ldap_service.rb', line 49
def level
berkeleyEduPersonServiceLevel
end
|
#modified_by ⇒ Object
53
54
55
|
# File 'lib/ucb_ldap_service.rb', line 53
def modified_by
berkeleyEduPersonServiceModifiedBy
end
|
#modified_date ⇒ Object
57
58
59
|
# File 'lib/ucb_ldap_service.rb', line 57
def modified_date
berkeleyEduPersonServiceModifiedDate
end
|
#naughty_bit ⇒ Object
61
62
63
|
# File 'lib/ucb_ldap_service.rb', line 61
def naughty_bit
berkeleyEduPersonServiceNaughtyBit
end
|
#notified_by ⇒ Object
65
66
67
|
# File 'lib/ucb_ldap_service.rb', line 65
def notified_by
berkeleyEduPersonServiceNotifyBy
end
|
#notify_date ⇒ Object
69
70
71
|
# File 'lib/ucb_ldap_service.rb', line 69
def notify_date
berkeleyEduPersonServiceNotifyDate
end
|
#service ⇒ Object
85
86
87
|
# File 'lib/ucb_ldap_service.rb', line 85
def service
berkeleyEduService
end
|
#stop_date ⇒ Object
77
78
79
|
# File 'lib/ucb_ldap_service.rb', line 77
def stop_date
berkeleyEduPersonServiceStopDate
end
|
#stopped_by ⇒ Object
73
74
75
|
# File 'lib/ucb_ldap_service.rb', line 73
def stopped_by
berkeleyEduPersonServiceStopBy
end
|
#value ⇒ Object
81
82
83
|
# File 'lib/ucb_ldap_service.rb', line 81
def value
berkeleyEduPersonServiceValue
end
|