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, 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.
100
101
102
103
104
|
# File 'lib/ucb_ldap_service.rb', line 100
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
87
88
89
|
# File 'lib/ucb_ldap_service.rb', line 87
def common_name
cn
end
|
#description ⇒ Object
91
92
93
|
# File 'lib/ucb_ldap_service.rb', line 91
def description
super.first
end
|
#eligible_by ⇒ Object
23
24
25
|
# File 'lib/ucb_ldap_service.rb', line 23
def eligible_by
berkeleyEduPersonServiceEligibleBy
end
|
#eligible_date ⇒ Object
27
28
29
|
# File 'lib/ucb_ldap_service.rb', line 27
def eligible_date
berkeleyEduPersonServiceEligibleDate
end
|
#end_date ⇒ Object
35
36
37
|
# File 'lib/ucb_ldap_service.rb', line 35
def end_date
berkeleyEduPersonServiceEndDate
end
|
#ended_by ⇒ Object
31
32
33
|
# File 'lib/ucb_ldap_service.rb', line 31
def ended_by
berkeleyEduPersonServiceEndBy
end
|
#entered_by ⇒ Object
39
40
41
|
# File 'lib/ucb_ldap_service.rb', line 39
def entered_by
berkeleyEduPersonServiceEnteredBy
end
|
#entered_date ⇒ Object
43
44
45
|
# File 'lib/ucb_ldap_service.rb', line 43
def entered_date
berkeleyEduPersonServiceEnteredDate
end
|
#level ⇒ Object
47
48
49
|
# File 'lib/ucb_ldap_service.rb', line 47
def level
berkeleyEduPersonServiceLevel
end
|
#modified_by ⇒ Object
51
52
53
|
# File 'lib/ucb_ldap_service.rb', line 51
def modified_by
berkeleyEduPersonServiceModifiedBy
end
|
#modified_date ⇒ Object
55
56
57
|
# File 'lib/ucb_ldap_service.rb', line 55
def modified_date
berkeleyEduPersonServiceModifiedDate
end
|
#naughty_bit ⇒ Object
59
60
61
|
# File 'lib/ucb_ldap_service.rb', line 59
def naughty_bit
berkeleyEduPersonServiceNaughtyBit
end
|
#notified_by ⇒ Object
63
64
65
|
# File 'lib/ucb_ldap_service.rb', line 63
def notified_by
berkeleyEduPersonServiceNotifyBy
end
|
#notify_date ⇒ Object
67
68
69
|
# File 'lib/ucb_ldap_service.rb', line 67
def notify_date
berkeleyEduPersonServiceNotifyDate
end
|
#service ⇒ Object
83
84
85
|
# File 'lib/ucb_ldap_service.rb', line 83
def service
berkeleyEduService
end
|
#stop_date ⇒ Object
75
76
77
|
# File 'lib/ucb_ldap_service.rb', line 75
def stop_date
berkeleyEduPersonServiceStopDate
end
|
#stopped_by ⇒ Object
71
72
73
|
# File 'lib/ucb_ldap_service.rb', line 71
def stopped_by
berkeleyEduPersonServiceStopBy
end
|
#value ⇒ Object
79
80
81
|
# File 'lib/ucb_ldap_service.rb', line 79
def value
berkeleyEduPersonServiceValue
end
|