Skip to content

RBAC: Private media not displayed in playlists for authorized group members #1370

@timullrich

Description

@timullrich

Describe the issue
When using RBAC, private media assigned to a category that is associated with a group is visible to group members in the category view and on the media detail page.
However, the same media is not listed in playlists, even if the playlist was created by the media owner and the viewer is a member of a group with access.

To Reproduce
Steps to reproduce the issue:

  1. Enable USE_RBAC = True in local_settings.py.
  2. Create a group Registered Users.
  3. Create a category Members and associate it with the group Registered Users.
  4. Log in as a user OwnerUser and upload a media file:
    • Assign it to category Members.
    • Set its state to private.
  5. Log in as OwnerUser and create a playlist containing this media file.
  6. Create another user John.Doe and assign him as a Member of Registered Users.
  7. Log in as John.Doe.

Result:

  • John.Doe can see the media in the category view and on the media detail page.
  • John.Doe does not see the same media in the playlist created by OwnerUser.

Expected behavior
Playlists should respect the same permission logic as media listings and detail pages.
Authorized users (RBAC group members, direct MediaPermission holders) should see the media in playlists as well.
The owner should also always see their own private media in their playlists.

Additional context

  • Setting listable=True manually does not persist for private media, since the model enforces listable=False when state="private".
  • This makes playlists inconsistent with the rest of the RBAC permission system.
  • Possibly related to this discussion: Global playlist #742
  • And introduced around this commit: 05414f6

Metadata

Metadata

Assignees

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