fix(auth+ds): passcode re-entry bug and Data Store v3 business logic

- e_app_access_type: reset checked_passcode on clear so same passcode
  can be re-entered without a page refresh (guard was blocking re-entry)
- element_data_store_v3: wire display prop to wrapper CSS style;
  gate "not found" diagnostic to administrator+ or trusted+edit_mode;
  public/anonymous visitors no longer see missing block warnings
- +page.svelte: add manager_access exception to header/content class_li
  so managers can see "not found" diagnostics (matches footer pattern)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-04 14:31:29 -05:00
parent fb78293fdf
commit 29093c45df
2 changed files with 11 additions and 6 deletions

View File

@@ -43,6 +43,7 @@
for_type = null,
for_id = null,
class_li = '',
display = undefined as string | undefined,
try_cache = true,
hide = false,
show_edit = $bindable(false),
@@ -303,7 +304,7 @@
}
</script>
<div class="ae__elem__data_store relative {class_li}" class:hidden={hide}>
<div class="ae__elem__data_store relative {class_li}" class:hidden={hide} style={display ? `display: ${display}` : undefined}>
{#if $lq__ds_obj}
{#if debug || $ae_loc.debug === 'debug'}
@@ -412,9 +413,13 @@
</button>
{/if}
{:else if ds_loading_status === 'not found'}
<div class="p-2 border border-dashed border-surface-500/30 rounded text-xs opacity-50">
Data Store not found: {ds_code}
</div>
<!-- Only show diagnostic to administrator+ (no edit_mode needed) or trusted staff in edit mode.
Anonymous/user/public visitors must never see internal data store codes or gaps. -->
{#if $ae_loc.administrator_access || ($ae_loc.trusted_access && $ae_loc.edit_mode)}
<div class="p-2 border border-dashed border-surface-500/30 rounded text-xs opacity-50">
Data Store not found: {ds_code}
</div>
{/if}
{/if}
{#if ds_loading_status === 'loading'}

View File

@@ -45,7 +45,7 @@
for_type={null}
for_id={null}
ds_name="Default: AE Hub - Site root page header HTML"
class_li={$ae_sess.ds_loaded.hub__site__root_page_header === false ? 'hidden' : ''}
class_li={!$ae_loc.manager_access && $ae_sess.ds_loaded.hub__site__root_page_header === false ? 'hidden' : ''}
bind:ds_loaded={$ae_sess.ds_loaded.hub__site__root_page_header}
/>
<!-- page header DS: {$ae_sess.ds_loaded.hub__site__root_page_header} -->
@@ -57,7 +57,7 @@
for_id={null}
ds_name="Default: AE Hub - Site root page content HTML"
show_edit={false}
class_li={$ae_sess.ds_loaded.hub__site__root_page_content === false ? 'hidden' : 'grow'}
class_li={!$ae_loc.manager_access && $ae_sess.ds_loaded.hub__site__root_page_content === false ? 'hidden' : 'grow'}
bind:ds_loaded={$ae_sess.ds_loaded.hub__site__root_page_content}
/>
<!-- page content DS: {$ae_sess.ds_loaded.hub__site__root_page_content} -->