summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/user.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-02-19 23:09:03 -0500
committerRob Crittenden <rcritten@redhat.com>2011-02-21 11:21:23 -0500
commit2f82112bb3fdb02801fb1cb71c169dc77786cf39 (patch)
tree03b8786b987b45777713259f799063e4a72921f8 /ipalib/plugins/user.py
parent18be4ebec317ad3e4d3b5684f506cadba8cdb837 (diff)
downloadfreeipa-2f82112bb3fdb02801fb1cb71c169dc77786cf39.tar.gz
freeipa-2f82112bb3fdb02801fb1cb71c169dc77786cf39.tar.xz
freeipa-2f82112bb3fdb02801fb1cb71c169dc77786cf39.zip
Add handling for indirect memberof other entries.
This creates a new custom attribute, memberofindirect_[plugin]. Using this you can tell the difference between being an actual memberof another entry and being a memberof as the result if inheritence. This is particularly useful when trying to remove members of an entry, you can only remove direct members. I had to add a couple of short sleep calls to make things work a little better. The memberof plugin runs as a postop and we have no way of knowing when it has done its work. If we don't pause we may show some stale data that memberof hasn't updated yet. .3 seconds is an arbitrary choice. ticket 966
Diffstat (limited to 'ipalib/plugins/user.py')
-rw-r--r--ipalib/plugins/user.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index 0ea3c231f..ae730125d 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -84,10 +84,12 @@ class user(LDAPObject):
default_attributes = [
'uid', 'givenname', 'sn', 'homedirectory', 'loginshell', 'ou',
'telephonenumber', 'title', 'memberof', 'nsaccountlock',
+ 'memberofindirect',
]
uuid_attribute = 'ipauniqueid'
attribute_members = {
'memberof': ['group', 'netgroup', 'role'],
+ 'memberofindirect': ['group', 'netgroup', 'role'],
}
rdnattr = 'uid'
bindable = True