Skip to content

Add option to override the album visibility for smart and tag albums#3379

Merged
ildyria merged 1 commit intomasterfrom
flag-access-override-smart-album
Jun 7, 2025
Merged

Add option to override the album visibility for smart and tag albums#3379
ildyria merged 1 commit intomasterfrom
flag-access-override-smart-album

Conversation

@ildyria
Copy link
Copy Markdown
Member

@ildyria ildyria commented May 28, 2025

This pull request introduces a new sensitivity filter for photo queries and adds configuration options to override photo visibility in smart and tag albums. The changes primarily focus on enhancing the flexibility of visibility settings and improving query handling for sensitive content.

New Sensitivity Filter and Visibility Handling

  • Added a new applySensitivityFilter method in PhotoQueryPolicy to restrict photo queries based on sensitivity settings. This method allows filtering out sensitive photos unless explicitly included (include_nsfw parameter). It also applies additional album-based restrictions if an origin album is provided.

  • Updated HasManyPhotosByTag to use the new applySensitivityFilter when the TA_override_visibility configuration is enabled, allowing tag albums to override photo visibility settings. [1] [2]

  • Modified BaseSmartAlbum to apply the applySensitivityFilter when the SA_override_visibility configuration is enabled, ensuring smart albums can override visibility settings while still applying album-specific conditions.

Configuration for Visibility Overrides

  • Added a new database migration to introduce two configuration options: SA_override_visibility and TA_override_visibility. These options allow administrators to enable visibility overrides for smart and tag albums, respectively.

@ildyria ildyria requested a review from a team as a code owner May 28, 2025 18:14
@ildyria ildyria added the Review: easy Easy review expected: probably just need a quick to go through. label May 28, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 43.24324% with 21 lines in your changes missing coverage. Please review.

Project coverage is 87.02%. Comparing base (c21c9e1) to head (6e3c6e6).
Report is 1 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.

@ildyria ildyria added the alpha-ready Branch is available in alpha label May 31, 2025
Comment thread database/migrations/2025_05_28_174009_add_visibility_override_smart_album.php Outdated
Comment thread database/migrations/2025_05_28_174009_add_visibility_override_smart_album.php Outdated
@ildyria ildyria force-pushed the flag-access-override-smart-album branch from 007a3c3 to 6e3c6e6 Compare June 7, 2025 10:18
@ildyria ildyria merged commit 5cc875e into master Jun 7, 2025
35 checks passed
@ildyria ildyria deleted the flag-access-override-smart-album branch June 7, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alpha-ready Branch is available in alpha Review: easy Easy review expected: probably just need a quick to go through.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants