fix(idaa): restrict Show/Hide Disabled buttons to manager_access + edit_mode
Disabled items are treated as functionally deleted for all end clients (including Trusted Access staff). Only Manager + Edit Mode should see Show/Hide Disabled controls — previously using administrator_access and missing edit_mode gate in BB and archives. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -168,7 +168,7 @@
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.edit_mode && $ae_loc.administrator_access && (!$idaa_loc.archives.qry__enabled || $idaa_loc.archives.qry__enabled == 'enabled')}
|
||||
{#if $ae_loc.edit_mode && $ae_loc.manager_access && (!$idaa_loc.archives.qry__enabled || $idaa_loc.archives.qry__enabled == 'enabled')}
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
@@ -182,7 +182,7 @@
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span> Show Disabled Events
|
||||
</button>
|
||||
{:else if $ae_loc.administrator_access && $idaa_loc.archives.qry__enabled != 'enabled'}
|
||||
{:else if $ae_loc.edit_mode && $ae_loc.manager_access && $idaa_loc.archives.qry__enabled != 'enabled'}
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.administrator_access && (!$idaa_loc.bb.qry__enabled || $idaa_loc.bb.qry__enabled == 'enabled')}
|
||||
{#if $ae_loc.edit_mode && $ae_loc.manager_access && (!$idaa_loc.bb.qry__enabled || $idaa_loc.bb.qry__enabled == 'enabled')}
|
||||
<button type="button"
|
||||
onclick={() => {
|
||||
$idaa_loc.bb.qry__enabled = 'all';
|
||||
@@ -151,7 +151,7 @@
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span> Show Disabled Posts
|
||||
</button>
|
||||
{:else if $ae_loc.administrator_access && $idaa_loc.bb.qry__enabled != 'enabled'}
|
||||
{:else if $ae_loc.edit_mode && $ae_loc.manager_access && $idaa_loc.bb.qry__enabled != 'enabled'}
|
||||
<button type="button"
|
||||
onclick={() => {
|
||||
$idaa_loc.bb.qry__enabled = 'enabled';
|
||||
|
||||
@@ -433,7 +433,7 @@
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc.edit_mode && $ae_loc.administrator_access && (!$idaa_loc.recovery_meetings.qry__enabled || $idaa_loc.recovery_meetings.qry__enabled == 'enabled')}
|
||||
{#if $ae_loc.edit_mode && $ae_loc.manager_access && (!$idaa_loc.recovery_meetings.qry__enabled || $idaa_loc.recovery_meetings.qry__enabled == 'enabled')}
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
@@ -451,7 +451,7 @@
|
||||
>
|
||||
<span class="fas fa-eye m-1"></span> Show Disabled Events
|
||||
</button>
|
||||
{:else if $ae_loc.edit_mode && $ae_loc.administrator_access && $idaa_loc.recovery_meetings.qry__enabled != 'enabled'}
|
||||
{:else if $ae_loc.edit_mode && $ae_loc.manager_access && $idaa_loc.recovery_meetings.qry__enabled != 'enabled'}
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
|
||||
Reference in New Issue
Block a user