Project

General

Profile

« Previous | Next » 

Revision 6938ac96

Added by Marc Dequènes over 13 years ago

  • ID 6938ac96781698408302bacc813ea26b2ac22229

[evol] implemented expert_attributes and hidden_attributes for aspects (closes #147)

View differences:

lib/ldap_shadows/elements/object.rb
end
def organized_data
# merge ignored and expert attributes for object and all present aspects
ignored_attrs = self.class.shadow.get_config[:presentation][:hidden_attributes]
ignored_attrs += self.class.parameters[:presentation][:hidden_attributes]
expert_attributes = self.class.parameters[:presentation][:expert_attributes]
self.aspects.values.each do |aspect|
aspect_data = aspect.parameters
ignored_attrs += aspect_data[:presentation][:hidden_attributes]
expert_attributes += aspect_data[:presentation][:expert_attributes]
end
attr_list = self.nonempty_attributes - ignored_attrs
expert_attributes = self.class.parameters[:presentation][:expert_attributes]
admin_attributes = attr_list.select do |attr|
ActiveLdap::Base.schema.attribute(attr).directory_operation?
end

Also available in: Unified diff