Revision 707b1758
Added by Marc Dequènes about 15 years ago
- ID 707b1758e76afac21e0ce6fcf9b82e9538cbdbb7
lib/ldap_shadows/elements/object.rb | ||
---|---|---|
|
||
def handle
|
||
name = self[dn_attribute] || self.attributes[dn_attribute] || self.dn
|
||
name = name[0] if name.is_a? Array
|
||
name = name.first if name.is_a? Array
|
||
name.strip
|
||
end
|
||
|
||
... | ... | |
remove_class(*aspect_data[:mapping][:classes])
|
||
end
|
||
|
||
def nonempty_attributes
|
||
self.attributes.collect{|key, val| val.blank? ? nil : key }.compact
|
||
end
|
||
|
||
def missing_attributes
|
||
self.must.collect{|attr| attr.name } - self.nonempty_attributes - ['objectClass']
|
||
end
|
||
|
||
def delete(options = {})
|
||
before_delete_jobs
|
||
super(options)
|
lib/ldap_shadows/lang_additions.rb | ||
---|---|---|
list
|
||
end
|
||
|
||
def nonempty_attributes
|
||
self.attributes.collect{|key, val| val.blank? ? nil : key }.compact
|
||
end
|
||
|
||
def missing_attributes
|
||
self.must.collect{|attr| attr.name } - self.nonempty_attributes - ['objectClass']
|
||
end
|
||
|
||
def self.objectclasses_attr_list(objectclass_list)
|
||
objectclass_list = [objectclass_list] unless objectclass_list.is_a? Array
|
||
list = []
|
Also available in: Unified diff
[cleanup] minor stuff