Frontend: Mount face-marker overlay in read-only display mode for viewers

Drops shouldShowEditButton() from the <p-face-marker-overlay> v-if so
non-editable users (Plus / Pro viewer role, anyone reaching the eye
toggle in the sidebar) actually see marker rectangles AND the
in-overlay Back button when they activate display mode. The previous
gate required edit permission, so viewers entered face-marker mode
(chrome hidden), saw nothing, and had no way to exit. Edit gestures
stay gated separately by the overlay's isEditMode flag and the
lightbox-side onCreateFaceMarker / onRemoveFaceMarker /
toggleFaceMarkerEdit handlers that re-check shouldShowEditButton().
Pre-existing bug; surfaced while testing the recent ACL-driven
sidebar refactor (#4966).
This commit is contained in:
Michael Mayer 2026-05-14 17:34:38 +00:00
parent 1d6698da04
commit f88e85e4f3

View file

@ -44,7 +44,7 @@
>
<div ref="lightbox" tabindex="-1" class="p-lightbox__pswp no-transition"></div>
<p-face-marker-overlay
v-if="shouldShowEditButton() && featPeople && faceMarkers.active && pswp()"
v-if="featPeople && faceMarkers.active && pswp()"
ref="faceMarkerOverlay"
:mode="faceMarkers.mode"
:markers="markers"