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>
|
</button>
|
||||||
{/if}
|
{/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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
>
|
>
|
||||||
<span class="fas fa-eye m-1"></span> Show Disabled Events
|
<span class="fas fa-eye m-1"></span> Show Disabled Events
|
||||||
</button>
|
</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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
</button>
|
</button>
|
||||||
{/if}
|
{/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"
|
<button type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
$idaa_loc.bb.qry__enabled = 'all';
|
$idaa_loc.bb.qry__enabled = 'all';
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
>
|
>
|
||||||
<span class="fas fa-eye m-1"></span> Show Disabled Posts
|
<span class="fas fa-eye m-1"></span> Show Disabled Posts
|
||||||
</button>
|
</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"
|
<button type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
$idaa_loc.bb.qry__enabled = 'enabled';
|
$idaa_loc.bb.qry__enabled = 'enabled';
|
||||||
|
|||||||
@@ -433,7 +433,7 @@
|
|||||||
</button>
|
</button>
|
||||||
{/if}
|
{/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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
@@ -451,7 +451,7 @@
|
|||||||
>
|
>
|
||||||
<span class="fas fa-eye m-1"></span> Show Disabled Events
|
<span class="fas fa-eye m-1"></span> Show Disabled Events
|
||||||
</button>
|
</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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user