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:
@@ -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`
|
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
|
were removed — the field is lock-synced from the per-event Config page now, same as the
|
||||||
other session field visibility toggles.
|
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)
|
### Step 6 scope (mechanical find-replace)
|
||||||
|
|
||||||
|
|||||||
@@ -175,14 +175,17 @@ async function on_delete(method: 'delete' | 'disable') {
|
|||||||
|
|
||||||
<div class="flex flex-col gap-4 p-4">
|
<div class="flex flex-col gap-4 p-4">
|
||||||
<!-- Presenter-specific display options -->
|
<!-- Presenter-specific display options -->
|
||||||
{#if $ae_loc.administrator_access}
|
{#if $ae_loc.trusted_access}
|
||||||
<section>
|
<section>
|
||||||
<h4
|
<h4
|
||||||
class="text-surface-500 mb-2 text-xs font-semibold tracking-wider uppercase">
|
class="text-surface-500 mb-2 text-xs font-semibold tracking-wider uppercase">
|
||||||
Display
|
Display
|
||||||
</h4>
|
</h4>
|
||||||
<div class="flex flex-row flex-wrap gap-2">
|
<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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
|
|||||||
@@ -109,8 +109,14 @@ $effect(() => {
|
|||||||
console.log(`$lq__event_presenter_obj:`, $lq__event_presenter_obj);
|
console.log(`$lq__event_presenter_obj:`, $lq__event_presenter_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pres_mgmt_loc.current.show_content__presenter_qr &&
|
// Generate QR when admin has enabled it (show__presenter_qr) OR trusted staff
|
||||||
(pres_mgmt_loc.current.show__presenter_qr || $ae_loc.trusted_access)) {
|
// 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 (
|
if (
|
||||||
$lq__event_presenter_obj.updated_on ==
|
$lq__event_presenter_obj.updated_on ==
|
||||||
$events_sess.pres_mgmt.presenter__updated_on
|
$events_sess.pres_mgmt.presenter__updated_on
|
||||||
@@ -209,7 +215,7 @@ $effect(() => {
|
|||||||
{#await ae_promises.generate_qr_code_url}
|
{#await ae_promises.generate_qr_code_url}
|
||||||
Generating...
|
Generating...
|
||||||
{:then result}
|
{: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
|
<div
|
||||||
class="group float-right m-1 flex flex-col items-center justify-center p-1 outline outline-gray-200 transition-all">
|
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 -->
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||||
|
|||||||
@@ -393,7 +393,10 @@ import {
|
|||||||
|
|
||||||
{#if $ae_loc.authenticated_access}
|
{#if $ae_loc.authenticated_access}
|
||||||
<div class="flex flex-col items-end justify-center gap-1">
|
<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}
|
{#if pres_mgmt_loc.current.show_content__session_qr}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -425,7 +428,10 @@ import {
|
|||||||
{/if}
|
{/if}
|
||||||
{/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}
|
{#if pres_mgmt_loc.current.show_content__presenter_qr}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
Reference in New Issue
Block a user