Revision dba6a81b
Added by Marc Dequènes almost 15 years ago
- ID dba6a81bf7e3ffa1413705d69285a5f97a6a32d9
lib/ldap_shadows/object.rb | ||
---|---|---|
obj_list = [obj_stuff]
|
||
end
|
||
obj_list.each do |obj|
|
||
obj.load_initial_attribute_list
|
||
obj.load_initial_attribute_list unless obj.nil?
|
||
end
|
||
return obj_stuff
|
||
end
|
||
... | ... | |
self.must.collect{|attr| attr.name } - self.nonempty_attributes - ['objectClass']
|
||
end
|
||
|
||
def save
|
||
check_hooks
|
||
super
|
||
end
|
||
|
||
def save!
|
||
check_hooks
|
||
super
|
||
end
|
||
|
||
protected
|
||
|
||
def check_hooks
|
||
self.aspects.each do |aspect|
|
||
aklass = self.class.mapper.get_aspect_klass(aspect)
|
||
next if aklass.nil?
|
||
|
||
if self.new_entry?
|
||
aklass.hook_create(self.class.mapper, self)
|
||
else
|
||
aklass.hook_mod(self.class.mapper, self)
|
||
end
|
||
end
|
||
end
|
||
|
||
def fetch_attributes_data(attr_list, expert_attributes)
|
||
attr_data = self.attributes.collect do |key, val|
|
||
if attr_list.include?(key)
|
Also available in: Unified diff
[evol] preliminary (dirty) work on hooks