-
-
Notifications
You must be signed in to change notification settings - Fork 856
Open
Description
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:
- Enable
USE_RBAC = Trueinlocal_settings.py. - Create a group
Registered Users. - Create a category
Membersand associate it with the groupRegistered Users. - Log in as a user
OwnerUserand upload a media file:- Assign it to category
Members. - Set its state to
private.
- Assign it to category
- Log in as
OwnerUserand create a playlist containing this media file. - Create another user
John.Doeand assign him as a Member ofRegistered Users. - Log in as
John.Doe.
Result:
John.Doecan see the media in the category view and on the media detail page.John.Doedoes not see the same media in the playlist created byOwnerUser.
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=Truemanually does not persist for private media, since the model enforceslistable=Falsewhenstate="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