Do not allow admins to delete their profiles from profile page

This commit is contained in:
DariusIII
2018-02-01 11:11:01 +01:00
parent d03a705fd0
commit bdef469b22
5 changed files with 14 additions and 5 deletions
+1
View File
@@ -1,4 +1,5 @@
2018-02-01 DariusIII
* Chg: Do not allow admins to delete their profiles from profile page
* Chg: Add check for users when deleting profile so they do not delete another users profile
* Chg: Remove occurences of ROLE_GUEST as that role is removed
2018-01-31 DariusIII
+3 -1
View File
@@ -243,7 +243,9 @@
<a class="btn btn-primary" href="{$smarty.const.WWW_TOP}profileedit">Edit
Profile</a>
{/if}
<a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
{if !isset($isadmin)}
<a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
{/if}
</div>
</div>
</div>
+4 -2
View File
@@ -1,10 +1,12 @@
<div class="col-md-8">
<ul class="inline">
<li><h2>Profile for {$user.username|escape:"htmlall"}</h2></li>
{if !$publicview}
{if isset($isadmin) || !$publicview}
<li style="vertical-align:text-bottom;"><a href="{$smarty.const.WWW_TOP}/profileedit" class="btn btn-small btn-warning">Edit</a></li>
{/if}
<li style="vertical-align:text-bottom;"><a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a></li>
{if !isset($isadmin)}
<li style="vertical-align:text-bottom;"><a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a></li>
{/if}
</ul>
<table class="data table" width="100%">
<tr>
+3 -1
View File
@@ -251,7 +251,9 @@
<a class="btn btn-primary" href="{$smarty.const.WWW_TOP}profileedit">Edit
Profile</a>
{/if}
<a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
{if !isset($isadmin)}
<a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
{/if}
</div>
</div>
</div>
+3 -1
View File
@@ -243,7 +243,9 @@
<a class="btn btn-primary" href="{$smarty.const.WWW_TOP}profileedit">Edit
Profile</a>
{/if}
<a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
{if !isset($isadmin)}
<a class="btn btn-warning confirm_action" href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
{/if}
</div>
</div>
</div>