Skip to content

feat(access): add video and audio transcoding controls to access groups #629

Closed

Description

@tomislav

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:

  • users stores transcode_allowed and audio_transcode_allowed.
  • access_groups stores max_transcodes, but neither permission flag.
  • The access-group CRUD API does not expose either flag.
  • ApplyGroupPolicy derives 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-groups request 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

  1. Tobechukwu-Njoku commented on Aug 24, 2026

    @Tobechukwu-Njoku
    Contributor

    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 main at 820eef77:

    • Schema — migrations/sql/20260819213116_user_policy_inherit_override.sql:11-12 adds transcode_allowed and audio_transcode_allowed to 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.
    • Model — internal/access/groups.go:24-26 and :40-42 carry TranscodeAllowed and AudioTranscodeAllowed (alongside DownloadTranscodeAllowed).
    • API — internal/api/handlers/access_groups.go:41-43 and :57-59 expose both as transcode_allowed / audio_transcode_allowed on the group create and update payloads, as *bool so unset means inherit rather than deny.
    • Web — web/src/components/UserPolicyFields.tsx:117-120 binds 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions