Merge 6265d04f09
into 3596e14249
This commit is contained in:
commit
97bd89bdbb
|
@ -486,7 +486,11 @@ class LdapCherry(object):
|
|||
"""
|
||||
for attr in attrs_backend:
|
||||
if attr in self.attributes.backend_attributes[backend_name]:
|
||||
attrid = self.attributes.backend_attributes[backend_name][attr]
|
||||
attr_desc = self.attributes.backend_attributes[backend_name][attr]
|
||||
if type(attr_desc) is list:
|
||||
attrid = attr_desc[0]['id']
|
||||
else:
|
||||
attrid = attr_desc['id']
|
||||
if attrid not in attrs_out:
|
||||
attrs_out[attrid] = attrs_backend[attr]
|
||||
|
||||
|
|
|
@ -61,9 +61,27 @@ class Attributes:
|
|||
self.key = attrid
|
||||
for b in attr['backends']:
|
||||
self.backends.add(b)
|
||||
backend_attr = attr['backends'][b]
|
||||
if b not in self.backend_attributes:
|
||||
self.backend_attributes[b] = {}
|
||||
self.backend_attributes[b][attr['backends'][b]] = attrid
|
||||
if backend_attr in self.backend_attributes[b]:
|
||||
if type(self.backend_attributes[b][backend_attr]) \
|
||||
is not list:
|
||||
self.backend_attributes[b][backend_attr] = [
|
||||
self.backend_attributes[b][backend_attr],
|
||||
]
|
||||
|
||||
self.backend_attributes[b][backend_attr].append(
|
||||
{
|
||||
'id':attrid,
|
||||
'type': attr['type']
|
||||
}
|
||||
)
|
||||
else:
|
||||
self.backend_attributes[b][backend_attr] = {
|
||||
'id':attrid,
|
||||
'type': attr['type']
|
||||
}
|
||||
if 'search_displayed' in attr and attr['search_displayed']:
|
||||
self.displayed_attributes[attrid] = attr
|
||||
|
||||
|
|
Loading…
Reference in New Issue