Revision 62aec43a
Added by Marc Dequènes about 15 years ago
- ID 62aec43ab6fc4791c5c97374b0e398f6860f17c4
lib/ldap_shadows/elements/object.rb | ||
---|---|---|
end
|
||
|
||
def relations
|
||
rel_list = []
|
||
|
||
rel_list += self.class.parameters[:presentation][:associated_relations] if self.class.parameters[:presentation][:associated_relations]
|
||
rel_list = self.class.parameters[:presentation][:associated_relations]
|
||
|
||
aspects.values.each do |aspect|
|
||
rel_list += aspect.parameters[:presentation][:associated_relations]
|
||
... | ... | |
present_aspects
|
||
end
|
||
|
||
def info_for_relation(rel)
|
||
return nil unless self.relations.include?(rel)
|
||
|
||
self.class.relations_info[rel.to_sym]
|
||
end
|
||
|
||
def organized_data
|
||
ignored_attrs = self.class.shadow.get_config[:presentation][:hidden_attributes]
|
||
ignored_attrs += self.class.parameters[:presentation][:hidden_attributes]
|
||
... | ... | |
raise PreProcessingError, _("No such relation '%s' for object '%s'") % [rel, self.class.handle]
|
||
end
|
||
|
||
rel_info = self.info_for_relation(rel)
|
||
rel_info = self.class.relations_info[rel]
|
||
if rel_info[:read_only]
|
||
raise PreProcessingError, _("The relation '%s' cannot be modified (read only)") % rel
|
||
end
|
Also available in: Unified diff
[cleanup] simplify relations_info access