summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-10-09 23:32:28 -0400
committerRob Crittenden <rcritten@redhat.com>2008-10-10 03:36:57 -0400
commit5d2a99925d4b8f8bb39dfbf4ae797d9845366109 (patch)
treed840278639c7c42696f8463399af00c286aed893 /ipalib
parent8a97b3e8a8f437cd99cc7cabbc719368b0247983 (diff)
downloadfreeipa-5d2a99925d4b8f8bb39dfbf4ae797d9845366109.tar.gz
freeipa-5d2a99925d4b8f8bb39dfbf4ae797d9845366109.tar.xz
freeipa-5d2a99925d4b8f8bb39dfbf4ae797d9845366109.zip
Implement group-mod
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/f_group.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/ipalib/plugins/f_group.py b/ipalib/plugins/f_group.py
index fd56b3ff5..eeb18c5cf 100644
--- a/ipalib/plugins/f_group.py
+++ b/ipalib/plugins/f_group.py
@@ -132,6 +132,25 @@ api.register(group_del)
class group_mod(crud.Mod):
'Edit an existing group.'
+ def execute(self, *args, **kw):
+ group_cn=args[0]
+ result = servercore.get_entry_by_cn(group_cn, ["*"])
+
+ group = kw
+ dn = result.get('dn')
+ del result['dn']
+ entry = ipaldap.Entry((dn, servercore.convert_scalar_values(result)))
+
+ for g in group:
+ entry.setValues(g, group[g])
+
+ result = servercore.update_entry(entry.toDict())
+
+ return result
+ def forward(self, *args, **kw):
+ result = super(crud.Mod, self).forward(*args, **kw)
+ if result:
+ print "Group %s modified" % args[0]
api.register(group_mod)