Only show Delete button for admins, editors and don't let user delete them self

Resolves 433382
This commit is contained in:
Rob Crittenden 2008-02-18 22:41:28 -05:00
parent 80a4e94e5b
commit 7e5f1514b2

View File

@ -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();"
/>