Skip to content

Add Legal warning about facial recogntion#4443

Merged
ildyria merged 2 commits into
masterfrom
warning-face-reco
Jun 21, 2026
Merged

Add Legal warning about facial recogntion#4443
ildyria merged 2 commits into
masterfrom
warning-face-reco

Conversation

@ildyria

@ildyria ildyria commented Jun 21, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added a configurable legal warning for facial recognition features, displayed on face-related pages.
    • Warning can be enabled/disabled by administrators via settings.
    • Users can acknowledge and dismiss the warning with a single action.
    • Added multi-language support for the warning (26 languages).

@ildyria ildyria requested a review from a team as a code owner June 21, 2026 22:04
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8d02dde6-9419-4b6b-9dfe-a1e4676de66e

📥 Commits

Reviewing files that changed from the base of the PR and between 988128d and e3e5de0.

📒 Files selected for processing (1)
  • resources/js/components/faceRecog/FaceRecognitionWarning.vue
🚧 Files skipped from review as they are similar to previous changes (1)
  • resources/js/components/faceRecog/FaceRecognitionWarning.vue

📝 Walkthrough

Walkthrough

Adds a dismissible facial recognition legal warning feature. A new ai_vision_face_recognition_warning boolean config is registered via a database migration, exposed through ModulesRightsResource as is_face_recognition_warning_enabled, and surfaced in a new FaceRecognitionWarning.vue component embedded in the FaceClusters and FaceMaintenance views. Translations are added for 20 locales across all_settings and people language files.

Changes

Face Recognition Legal Warning Feature

Layer / File(s) Summary
Migration, DTO property, and TypeScript type
database/migrations/2026_06_21_000001_add_face_recognition_warning_config.php, app/Http/Resources/Rights/ModulesRightsResource.php, resources/js/lychee.d.ts
Registers the ai_vision_face_recognition_warning boolean config (default '1') via migration, exposes is_face_recognition_warning_enabled on ModulesRightsResource populated from request configs, and adds the matching boolean field to the TypeScript declaration.
FaceRecognitionWarning Vue component
resources/js/components/faceRecog/FaceRecognitionWarning.vue
Conditionally renders a legal notice panel when initData.modules.is_face_recognition_warning_enabled is true; loads global rights on mount if initData is absent; calls SettingsService.setConfigs on accept to persist dismissal and locally flips the flag to hide the panel.
FaceClusters and FaceMaintenance integration
resources/js/views/face-recog/FaceClusters.vue, resources/js/views/face-recog/FaceMaintenance.vue
Both views import and render FaceRecognitionWarning in their templates (before the loading state in FaceClusters; after the toolbar in FaceMaintenance).
i18n translations across 20 locales
lang/*/all_settings.php, lang/*/people.php
Adds ai_vision_face_recognition_warning entries to documentation and details sections and adds face_recognition_warning translation blocks (title, legal notice, Netherlands example, similar rules, no-liability, acknowledge, accept) to people files across all 20 supported locales.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop hop, a warning appears on the screen,
For faces detected where privacy's keen!
The rabbit checks boxes with one furry paw,
"Accept & Dismiss" — abiding by law.
Twenty translations, all tidy and bright,
The warren's in order — legal and right! ✨

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@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: 5

🧹 Nitpick comments (1)
routes/api_v2.php (1)

178-178: 🧹 Nitpick | 🔵 Trivial

Login endpoint is already rate-limited via inherited 'api' middleware; commented throttle references undefined rate limiter.

The login route at line 178 inherits the api middleware applied to all routes in api_v2.php (configured in RouteServiceProvider.php line 50), which enforces a rate limit of 60 requests per minute. This provides baseline protection against brute force attacks.

However, the commented-out throttle middleware references throttle:10,60,login, which attempts to define a custom 10 requests per 60 seconds limit for the login endpoint. This is broken because there is no 'login' rate limiter defined in the codebase—only 'api' and 'geo-queue' limiters exist in RouteServiceProvider.php. If uncommented, this would likely fail or silently fall back to the default 'api' limiter.

If stricter rate limiting for authentication endpoints is desired, define a proper 'login' rate limiter in RouteServiceProvider.php and uncomment the middleware, or update the throttle to use the 'api' limiter with a reduced time window.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d379a34c-5d05-412c-835f-76aa77b50437

📥 Commits

Reviewing files that changed from the base of the PR and between 1a572c6 and 988128d.

📒 Files selected for processing (53)
  • app/Http/Resources/Rights/ModulesRightsResource.php
  • database/migrations/2026_06_21_000001_add_face_recognition_warning_config.php
  • lang/ar/all_settings.php
  • lang/ar/people.php
  • lang/bg/all_settings.php
  • lang/bg/people.php
  • lang/cz/all_settings.php
  • lang/cz/people.php
  • lang/de/all_settings.php
  • lang/de/people.php
  • lang/el/all_settings.php
  • lang/el/people.php
  • lang/en/all_settings.php
  • lang/en/people.php
  • lang/es/all_settings.php
  • lang/es/people.php
  • lang/fa/all_settings.php
  • lang/fa/people.php
  • lang/fr/all_settings.php
  • lang/fr/people.php
  • lang/hu/all_settings.php
  • lang/hu/people.php
  • lang/it/all_settings.php
  • lang/it/people.php
  • lang/ja/all_settings.php
  • lang/ja/people.php
  • lang/nl/all_settings.php
  • lang/nl/people.php
  • lang/no/all_settings.php
  • lang/no/people.php
  • lang/pl/all_settings.php
  • lang/pl/people.php
  • lang/pt/all_settings.php
  • lang/pt/people.php
  • lang/ru/all_settings.php
  • lang/ru/people.php
  • lang/sk/all_settings.php
  • lang/sk/people.php
  • lang/sv/all_settings.php
  • lang/sv/people.php
  • lang/tr/all_settings.php
  • lang/tr/people.php
  • lang/vi/all_settings.php
  • lang/vi/people.php
  • lang/zh_CN/all_settings.php
  • lang/zh_CN/people.php
  • lang/zh_TW/all_settings.php
  • lang/zh_TW/people.php
  • resources/js/components/faceRecog/FaceRecognitionWarning.vue
  • resources/js/lychee.d.ts
  • resources/js/views/face-recog/FaceClusters.vue
  • resources/js/views/face-recog/FaceMaintenance.vue
  • routes/api_v2.php

Comment thread lang/bg/people.php
Comment thread lang/cz/people.php
Comment thread lang/sk/people.php
Comment thread lang/zh_TW/people.php
Comment thread resources/js/components/faceRecog/FaceRecognitionWarning.vue
@ildyria ildyria merged commit bb46bf2 into master Jun 21, 2026
46 checks passed
@ildyria ildyria deleted the warning-face-reco branch June 21, 2026 23:18
@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.45%. Comparing base (1a572c6) to head (e3e5de0).
⚠️ Report is 3 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant