From 17ee494db0a95e791d71261cedf0478e8a40cf4b Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Fri, 5 Jun 2026 17:35:35 +0100 Subject: Fix delete permission: p_remove_contact → p_contact_expunge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- templates/contact_date_bar.tpl | 2 +- templates/list_contact.tpl | 4 ++-- templates/list_contacts.tpl | 4 ++-- 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} {biticon ipackage="icons" iname="document-print" iexplain="print"} - {if $gBitUser->hasPermission('p_remove_contact')} + {if $gBitUser->hasPermission('p_contact_expunge')} {biticon ipackage="icons" iname="user-trash" iexplain="delete"} {/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 @@ {* 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 *} - {if $gBitUser->hasPermission('p_remove_contact')} + {if $gBitUser->hasPermission('p_contact_expunge')} {/if} {* add here e.g. *} -- cgit v1.3