summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/baseldap.py9
-rw-r--r--ipalib/plugins/group.py1
-rw-r--r--ipalib/plugins/user.py1
3 files changed, 9 insertions, 2 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index d91fd938..259d02b0 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -233,6 +233,9 @@ class LDAPObject(Object):
object_name_plural = 'entries'
object_class = []
object_class_config = None
+ # If an objectclass is possible but not default in an entry. Needed for
+ # collecting attributes for ACI UI.
+ possible_objectclasses = []
search_attributes = []
search_attributes_config = None
default_attributes = []
@@ -356,17 +359,19 @@ class LDAPObject(Object):
objectclasses = config.get(
self.object_class_config, objectclasses
)
+ objectclasses += self.possible_objectclasses
# Get list of available attributes for this object for use
# in the ACI UI.
attrs = self.api.Backend.ldap2.schema.attribute_types(objectclasses)
attrlist = []
# Go through the MUST first
for (oid, attr) in attrs[0].iteritems():
- attrlist.append(attr.names[0])
+ attrlist.append(attr.names[0].lower())
# And now the MAY
for (oid, attr) in attrs[1].iteritems():
- attrlist.append(attr.names[0])
+ attrlist.append(attr.names[0].lower())
json_dict['aciattrs'] = attrlist
+ attrlist.sort()
json_dict['methods'] = [m for m in self.methods]
return json_dict
diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py
index 4ba9b618..9fd24008 100644
--- a/ipalib/plugins/group.py
+++ b/ipalib/plugins/group.py
@@ -81,6 +81,7 @@ class group(LDAPObject):
object_name_plural = 'groups'
object_class = ['ipausergroup']
object_class_config = 'ipagroupobjectclasses'
+ possible_objectclasses = ['posixGroup', 'mepManagedEntry']
search_attributes_config = 'ipagroupsearchfields'
default_attributes = [
'cn', 'description', 'gidnumber', 'member', 'memberof',
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index 62097549..17e5e3c5 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -63,6 +63,7 @@ class user(LDAPObject):
object_name_plural = 'users'
object_class = ['posixaccount']
object_class_config = 'ipauserobjectclasses'
+ possible_objectclasses = ['meporiginentry']
search_attributes_config = 'ipausersearchfields'
default_attributes = [
'uid', 'givenname', 'sn', 'homedirectory', 'loginshell', 'ou',