Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ManageOwnMedia allows the user to manage other's media #14433

Closed
MikeAlhayek opened this issue Oct 5, 2023 · 3 comments
Closed

ManageOwnMedia allows the user to manage other's media #14433

MikeAlhayek opened this issue Oct 5, 2023 · 3 comments
Labels
Milestone

Comments

@MikeAlhayek
Copy link
Member

MikeAlhayek commented Oct 5, 2023

Describe the bug

I want users to be able to manage/see their own media only. I granted them ManageOwnMedia permission, but they are still able to list and manage all the media.

Expected behavior

When a user only has ManageOwnMedia, they should only be able to list, edit, delete media that was originally uploaded by them

@jtkech we have ManageMediaFolderAuthorizationHandler which handles permission for folders to a given path. But, I do not see anywhere were we provide path name as a resource and we do ManageOwnMedia check against the file owner.

I also don't think we store media meta info as in who uploaded the file. Do we store this info anywhere "storage meta" or database?

@hishamco
Copy link
Member

hishamco commented Oct 6, 2023

I think this is a known issue, I'm not sure if @agriffard or @sebastienros remember it

@sebastienros
Copy link
Member

After looking at existing PRs and issues related to that, we might just need to change the handler to grant ManageMedia when the user has ManageOwnMedia and the destination folder is the user's folder. The handler might then require the destination media (or folder) to provide this.

@gvkries
Copy link
Contributor

gvkries commented Jan 26, 2024

As we closed #15159 as a duplicate, should we also close this for this in favor of the even older issue #12057?

@MikeAlhayek MikeAlhayek modified the milestones: 2.x, 2.0 Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants