summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-05 17:35:35 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-05 17:35:35 +0100
commit17ee494db0a95e791d71261cedf0478e8a40cf4b (patch)
tree297cc2634bebaeee9cfaf8b2e9d9946a4c162dcb
parentf81d962b373dd701ddb91b965c49857519501061 (diff)
downloadcontact-17ee494db0a95e791d71261cedf0478e8a40cf4b.tar.gz
contact-17ee494db0a95e791d71261cedf0478e8a40cf4b.tar.bz2
contact-17ee494db0a95e791d71261cedf0478e8a40cf4b.zip
Fix delete permission: p_remove_contact → p_contact_expunge
p_remove_contact was never in the schema; three templates were silently hiding delete actions for all users. Now correctly gates on p_contact_expunge. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rwxr-xr-xtemplates/contact_date_bar.tpl2
-rwxr-xr-xtemplates/list_contact.tpl4
-rwxr-xr-xtemplates/list_contacts.tpl4
3 files changed, 5 insertions, 5 deletions
diff --git a/templates/contact_date_bar.tpl b/templates/contact_date_bar.tpl
index 5ea32a5..d8caca6 100755
--- a/templates/contact_date_bar.tpl
+++ b/templates/contact_date_bar.tpl
@@ -9,7 +9,7 @@
{/if}
{/if}
<a title="{tr}print{/tr}" href="print.php?content_id={$gContent->mInfo.content_id}">{biticon ipackage="icons" iname="document-print" iexplain="print"}</a>
- {if $gBitUser->hasPermission('p_remove_contact')}
+ {if $gBitUser->hasPermission('p_contact_expunge')}
<a title="{tr}remove this contact{/tr}" href="remove_contact.php?content_id={$gContent->mInfo.content_id}">{biticon ipackage="icons" iname="user-trash" iexplain="delete"}</a>
{/if}
{/if} {* end print_page *}
diff --git a/templates/list_contact.tpl b/templates/list_contact.tpl
index 5e7f7a2..6dd6c31 100755
--- a/templates/list_contact.tpl
+++ b/templates/list_contact.tpl
@@ -32,7 +32,7 @@
<tr>
{* at the moment, the only working option to use the checkboxes for is deleting pages. so for now the checkboxes are visible iff $bit_p_remove is set. Other applications make sense as well (categorize, convert to pdf, etc). Add necessary corresponding permission here: *}
- {if $gBitUser->hasPermission('p_remove_contact')} {* ... "or $bit_p_other_sufficient_condition_for_checkboxes eq 'y'" *}
+ {if $gBitUser->hasPermission('p_contact_expunge')} {* ... "or $bit_p_other_sufficient_condition_for_checkboxes eq 'y'" *}
{assign var='checkboxes_on' value='y'}
{else}
{assign var='checkboxes_on' value='n'}
@@ -98,7 +98,7 @@
{if $checkboxes_on eq 'y'} {* what happens to the checked items *}
<select name="submit_mult" onchange="this.form.submit();">
<option value="" selected="selected">{tr}with checked{/tr}:</option>
- {if $gBitUser->hasPermission('p_remove_contact')}
+ {if $gBitUser->hasPermission('p_contact_expunge')}
<option value="remove_contact">{tr}remove{/tr}</option>
{/if}
{* add here e.g. <option value="categorize">{tr}categorize{/tr}</option> *}
diff --git a/templates/list_contacts.tpl b/templates/list_contacts.tpl
index 1bc574d..0a726e2 100755
--- a/templates/list_contacts.tpl
+++ b/templates/list_contacts.tpl
@@ -32,7 +32,7 @@
<tr>
{* at the moment, the only working option to use the checkboxes for is deleting pages. so for now the checkboxes are visible iff $bit_p_remove is set. Other applications make sense as well (categorize, convert to pdf, etc). Add necessary corresponding permission here: *}
-{if $gBitUser->hasPermission('p_remove_contact')} {* ... "or $bit_p_other_sufficient_condition_for_checkboxes eq 'y'" *}
+{if $gBitUser->hasPermission('p_contact_expunge')} {* ... "or $bit_p_other_sufficient_condition_for_checkboxes eq 'y'" *}
{assign var='checkboxes_on' value='y'}
{else}
{assign var='checkboxes_on' value='n'}
@@ -98,7 +98,7 @@
{if $checkboxes_on eq 'y'} {* what happens to the checked items *}
<select name="submit_mult" onchange="this.form.submit();">
<option value="" selected="selected">{tr}with checked{/tr}:</option>
- {if $gBitUser->hasPermission('p_remove_contact')}
+ {if $gBitUser->hasPermission('p_contact_expunge')}
<option value="remove_contact">{tr}remove{/tr}</option>
{/if}
{* add here e.g. <option value="categorize">{tr}categorize{/tr}</option> *}