summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-02-18 22:41:28 -0500
committerRob Crittenden <rcritten@redhat.com>2008-02-18 22:41:28 -0500
commit7e5f1514b2207790c76ac4538212afc531314d0b (patch)
treee69657cc10bb629e7bddb45db589d791de158e4b
parent80a4e94e5b102847786e5f5be0f0853df21bb4d9 (diff)
downloadfreeipa-7e5f1514b2207790c76ac4538212afc531314d0b.tar.gz
freeipa-7e5f1514b2207790c76ac4538212afc531314d0b.tar.xz
freeipa-7e5f1514b2207790c76ac4538212afc531314d0b.zip
Only show Delete button for admins, editors and don't let user delete them self
Resolves 433382
-rw-r--r--ipa-server/ipa-gui/ipagui/templates/usereditform.kid6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipa-server/ipa-gui/ipagui/templates/usereditform.kid b/ipa-server/ipa-gui/ipagui/templates/usereditform.kid
index 14aa42f3..35b2e35c 100644
--- a/ipa-server/ipa-gui/ipagui/templates/usereditform.kid
+++ b/ipa-server/ipa-gui/ipagui/templates/usereditform.kid
@@ -30,7 +30,8 @@
value="Update User"/>
<input type="submit" class="submitbutton" name="submit"
value="Cancel Edit" />
- <input type="button" class="submitbutton"
+ <input py:if="'editors' in tg.identity.groups or 'admins' in tg.identity.groups and tg.identity.display_name != value.get('uid')"
+ type="button" class="submitbutton"
value="Delete User"
onclick="return confirmDelete();"
/>
@@ -885,7 +886,8 @@ from ipagui.helpers import ipahelper
value="Update User"/>
<input type="submit" class="submitbutton" name="submit"
value="Cancel Edit" />
- <input type="button" class="submitbutton"
+ <input py:if="'editors' in tg.identity.groups or 'admins' in tg.identity.groups and tg.identity.display_name != value.get('uid')"
+ type="button" class="submitbutton"
value="Delete User"
onclick="return confirmDelete();"
/>