feat(content-filtering): add per-user content rating filters #2275
+820
−63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Per-User Content Rating Filters
Adds support for per-user content rating restrictions across all discovery endpoints. Admins can now configure maximum allowed movie and TV ratings for each user, with unrated content handled via an NR option. The filtering system prioritizes US certifications and falls back to the most restrictive international rating when needed.
Description
Problem
Users (particularly parents managing family accounts) need the ability to restrict content based on movie/TV ratings on a per-user basis. Currently, all users see the same content regardless of age-appropriateness.
Solution
This PR implements comprehensive content rating filters that:
Technical Approach
maxMovieRatingandmaxTvRatingcolumns touser_settingstable with SQLite migration and PostgreSQL migrationPermission.MANAGE_USERSto restrict access to admin users onlyChanges Include
1736000000000-AddContentRatingFilters.tsAI Assistance Notice
This PR was developed with substantial assistance from GitHub Copilot (Claude Sonnet 4.5). The AI helped with:
I understand the implementation and have tested it extensively in my local environment.
How Has This Been Tested?
Test Environment
pnpm buildTest Scenarios
1. Admin Controls
2. Content Filtering
3. Rating Logic
Results
All test scenarios passed. Content filtering works comprehensively across the application with no performance issues observed (async filtering processes efficiently).
Screenshots / Logs
Screenshots can be provided upon request showing:
Checklist:
pnpm buildpnpm i18n:extract