Repository navigation
Description
Summary
Access groups can currently define max_transcodes, but they cannot control whether members may perform video or audio-only transcoding.
The equivalent user editor supports:
- Disabling video transcoding with
transcode_allowed - Independently permitting audio-only transcoding with
audio_transcode_allowed
Adding these controls to access groups would allow administrators to configure the policy once for every member instead of editing users individually.
Current behavior
Confirmed by auditing current main at commit ee9356a:
usersstorestranscode_allowedandaudio_transcode_allowed.access_groupsstoresmax_transcodes, but neither permission flag.- The access-group CRUD API does not expose either flag.
ApplyGroupPolicyderives both effective permission flags solely from the user.- The access-group editor renders a numeric “Max transcodes” field without the video-disable/audio-transcodes controls available in the user editor.
This is a code-audit finding, not a runtime bug report. No deployment reproduction or logs are claimed.
Proposed behavior
Add transcode_allowed and audio_transcode_allowed to access groups.
Because group composition is restriction-only, effective permissions should be:
effective transcode_allowed =
user.transcode_allowed && group.transcode_allowed
effective audio_transcode_allowed =
user.audio_transcode_allowed && group.audio_transcode_allowed
Existing access groups should default both fields to true so the migration preserves current behavior.
The access-group editor should offer the same interaction currently available under a user’s “Max Transcodes” setting:
- Enable or disable video transcoding.
- When video transcoding is disabled, independently allow or disallow audio transcodes.
- Disable the numeric limit input when video transcoding is disabled.
Scope
- Additive Goose migration for both access-group columns
- Access-group store models, queries, and CRUD inputs
- Additive
/api/v1/admin/access-groupsrequest and response fields - Restriction-only effective-policy composition
- Access-group web API types and editor controls
- Store, handler, policy-composition, and frontend tests
Compatibility
This can remain additive within /api/v1. Defaulting both new fields to true should preserve the behavior of existing groups and their members.
No Android or Apple client changes appear necessary because this is an admin web surface and the effective playback policy is enforced server-side.
AI Disclosure
- Tool(s): Codex
- Model(s): gpt-5.6
- Involvement: AI-assisted
- Adversarial review: No implementation diff exists. The issue was cross-checked against the current database schema, access-group store and API contracts, effective-policy composition, web API types, UI implementation, tests, and related Git history. Searches found no matching existing GitHub issue.
Activity
Tobechukwu-Njoku commentedon Aug 24, 2026
This looks implemented on
main— #691 ("Scoped admin API keys, and inherit/override user policy") merged 2026-08-20 and carried it in, without closing keywords.Checked against
mainat820eef77:migrations/sql/20260819213116_user_policy_inherit_override.sql:11-12addstranscode_allowedandaudio_transcode_allowedto the access-groups table. The migration's own comment states the intent directly: "Access groups gain the two transcode gates so every user-level field has a" group equivalent.internal/access/groups.go:24-26and:40-42carryTranscodeAllowedandAudioTranscodeAllowed(alongsideDownloadTranscodeAllowed).internal/api/handlers/access_groups.go:41-43and:57-59expose both astranscode_allowed/audio_transcode_allowedon the group create and update payloads, as*boolso unset means inherit rather than deny.web/src/components/UserPolicyFields.tsx:117-120binds both from the group, so the controls render in the admin group editor rather than only the user editor.That covers the ask in the summary — configuring the policy once per group instead of per user.