Skip to content

fix the 401 error on faces when a visitor loads a photo - #4642

Open
jphuguet wants to merge 1 commit into
LycheeOrg:masterfrom
jphuguet:fix/face-recognition-visitors
Open

fix the 401 error on faces when a visitor loads a photo#4642
jphuguet wants to merge 1 commit into
LycheeOrg:masterfrom
jphuguet:fix/face-recognition-visitors

Conversation

@jphuguet

@jphuguet jphuguet commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

fix the 401 error on faces when a visitor loads a photo

Summary by CodeRabbit

  • Bug Fixes
    • Improved face visibility controls in photo details.
    • Face data is no longer requested when face recognition or face overlays are unavailable.
    • Prevented face information from being displayed without the required permissions and features.

@jphuguet
jphuguet requested a review from a team as a code owner August 19, 2026 12:19
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Both v7 and v8 PhotoDetails components now require face recognition and face overlay modules for face rendering and fetching. Their watchers skip face requests when visibility, photo ID, or detected faces are unavailable.

Changes

Face visibility gating

Layer / File(s) Summary
Shared face visibility guard
resources/js/v7/components/drawers/PhotoDetails.vue, resources/js/v8/components/drawers/PhotoDetails.vue
Both components define areFacesVisible from the face-recognition and face-overlay module states. The people-in-photo sections use this guard.
Conditional face fetching
resources/js/v7/components/drawers/PhotoDetails.vue, resources/js/v8/components/drawers/PhotoDetails.vue
Both face-fetch watchers observe visibility changes and skip requests when overlays are unavailable, the photo ID is missing, or no faces are detected.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to f6ff4

The change still disables face rendering and face-data loading for authorized users because both versions use the wrong overlay state field. Replace it with the shared visibility field before merging.

Poem

I’m a rabbit guarding faces bright,
Two modules must approve the light.
If overlays hide or photos fade,
No needless fetch requests are made.
Hop, hop—the guard is shared today!

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 77143752-aace-4c6e-8b1c-af522b63857c

📥 Commits

Reviewing files that changed from the base of the PR and between 9aafefc and f6ff433.

📒 Files selected for processing (2)
  • resources/js/v7/components/drawers/PhotoDetails.vue
  • resources/js/v8/components/drawers/PhotoDetails.vue

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Comment thread resources/js/v7/components/drawers/PhotoDetails.vue
@ildyria

ildyria commented Aug 22, 2026

Copy link
Copy Markdown
Member

is_face_recognition_enabled < The fix should be to set this to false when the person has no access to the facial recognition capabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants