fix(pres_mgmt): presenter QR follows session QR global-default pattern

show__presenter_qr (admin) is meant to be the global default for everyone,
signed in or not. show_content__presenter_qr is a trusted-staff-only local
override for when the admin hasn't enabled it globally. Presenter QR was
still on the old logic requiring show_content__presenter_qr to also be
true even when the admin enabled it for everyone — non-trusted users
(presenters) have no way to set that flag, so QR never appeared for them.

- presenter_view.svelte: generation effect + display block now use
  show__presenter_qr || (trusted_access && show_content__presenter_qr),
  matching the session_view.svelte fix from earlier today
- presenter_page_menu.svelte: QR toggle was gated to administrator_access,
  hiding it from plain Trusted onsite staff; loosened to trusted_access
  and dropped the redundant `|| trusted_access` (now only shown when
  admin hasn't already enabled QR globally)
- ae_comp__events_menu_opts.svelte: both session and presenter QR toggles
  were visible to all authenticated_access users whenever admin had
  enabled QR globally, even though the toggle had no effect for them;
  now gated to trusted_access && !show__*_qr, matching session_page_menu.svelte
- Log the fix in PROJECT__AE_Events_PressMgmt_Config_Cleanup.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-16 12:14:24 -04:00
parent 2e4547f433
commit a37866e5bb
4 changed files with 36 additions and 7 deletions

View File

@@ -233,6 +233,20 @@ Safe and backward compatible — old DB records fall through to `?? false` defau
Column" toggle buttons in `ae_comp__events_menu_opts.svelte` and `event_page_menu.svelte`
were removed — the field is lock-synced from the per-event Config page now, same as the
other session field visibility toggles.
- [x] **Presenter QR matched to session QR pattern (2026-06-16)**`show__session_qr` /
`show__presenter_qr` are the admin-set **global default for everyone**, signed in or not.
`show_content__*_qr` is a **trusted-staff-only local override**, used when the admin has
NOT enabled QR globally. The session QR side already worked this way (fixed earlier today);
presenter QR was still on the old buggy logic requiring `show_content__presenter_qr` to be
true even when the admin had enabled it for everyone, which non-trusted users (presenters)
have no way to set. Fixed `presenter_view.svelte` (generation effect + display block) to
`show__presenter_qr || (trusted_access && show_content__presenter_qr)`. Also corrected two
toggle-button visibility bugs found along the way: `ae_comp__events_menu_opts.svelte` was
showing the QR toggle to all `authenticated_access` users (not just trusted) whenever the
admin had enabled QR globally, even though the toggle had no effect for them; and
`presenter_page_menu.svelte`'s QR toggle was gated to `administrator_access`, hiding it from
plain Trusted onsite staff entirely. Both now use the canonical pattern from
`session_page_menu.svelte`: `trusted_access && !show__*_qr`.
### Step 6 scope (mechanical find-replace)

View File

@@ -175,14 +175,17 @@ async function on_delete(method: 'delete' | 'disable') {
<div class="flex flex-col gap-4 p-4">
<!-- Presenter-specific display options -->
{#if $ae_loc.administrator_access}
{#if $ae_loc.trusted_access}
<section>
<h4
class="text-surface-500 mb-2 text-xs font-semibold tracking-wider uppercase">
Display
</h4>
<div class="flex flex-row flex-wrap gap-2">
{#if pres_mgmt_loc.current.show__presenter_qr || $ae_loc.trusted_access}
<!-- QR Code toggle — only shown to trusted staff and only when
admin has NOT already enabled QR globally (if they have,
it shows automatically without needing this toggle) -->
{#if !pres_mgmt_loc.current.show__presenter_qr}
<button
type="button"
onclick={() => {

View File

@@ -109,8 +109,14 @@ $effect(() => {
console.log(`$lq__event_presenter_obj:`, $lq__event_presenter_obj);
}
if (pres_mgmt_loc.current.show_content__presenter_qr &&
(pres_mgmt_loc.current.show__presenter_qr || $ae_loc.trusted_access)) {
// Generate QR when admin has enabled it (show__presenter_qr) OR trusted staff
// has turned on their local override (show_content__presenter_qr).
// show_content__presenter_qr is NOT required when show__presenter_qr is true —
// non-trusted users (presenters) have no way to toggle it.
if (
pres_mgmt_loc.current.show__presenter_qr ||
($ae_loc.trusted_access && pres_mgmt_loc.current.show_content__presenter_qr)
) {
if (
$lq__event_presenter_obj.updated_on ==
$events_sess.pres_mgmt.presenter__updated_on
@@ -209,7 +215,7 @@ $effect(() => {
{#await ae_promises.generate_qr_code_url}
Generating...
{:then result}
{#if ae_promises.generate_qr_code_url && (pres_mgmt_loc.current.show__presenter_qr || $ae_loc.trusted_access)}
{#if ae_promises.generate_qr_code_url && (pres_mgmt_loc.current.show__presenter_qr || ($ae_loc.trusted_access && pres_mgmt_loc.current.show_content__presenter_qr))}
<div
class="group float-right m-1 flex flex-col items-center justify-center p-1 outline outline-gray-200 transition-all">
<!-- svelte-ignore a11y_click_events_have_key_events -->

View File

@@ -393,7 +393,10 @@ import {
{#if $ae_loc.authenticated_access}
<div class="flex flex-col items-end justify-center gap-1">
{#if pres_mgmt_loc.current.show__session_qr || $ae_loc.trusted_access}
<!-- Session QR toggle — only shown to trusted staff and only when
admin has NOT already enabled QR globally (if they have, it
shows automatically for everyone without needing this toggle) -->
{#if $ae_loc.trusted_access && !pres_mgmt_loc.current.show__session_qr}
{#if pres_mgmt_loc.current.show_content__session_qr}
<button
type="button"
@@ -425,7 +428,10 @@ import {
{/if}
{/if}
{#if pres_mgmt_loc.current.show__presenter_qr || $ae_loc.trusted_access}
<!-- Presenter QR toggle — only shown to trusted staff and only when
admin has NOT already enabled QR globally (if they have, it
shows automatically for everyone without needing this toggle) -->
{#if $ae_loc.trusted_access && !pres_mgmt_loc.current.show__presenter_qr}
{#if pres_mgmt_loc.current.show_content__presenter_qr}
<button
type="button"