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

Media permissions #9369

Closed
sebastienros opened this issue May 6, 2021 · 11 comments · Fixed by #15173
Closed

Media permissions #9369

sebastienros opened this issue May 6, 2021 · 11 comments · Fixed by #15173
Labels
Milestone

Comments

@sebastienros
Copy link
Member

Create dynamic permissions for each first level folder:

  • List files
  • Serve files (requires custom middleware, if we don't have a custom one already)
  • Edit (add, delete) files

When rendering or editing files in the admin, check for current user permissions.

@pgy866
Copy link

pgy866 commented Aug 20, 2021

Can files under media permissions support historical versions, or can all content have historical versions that can be rolled back? The metadata of the database record file. Is there any adoption value?
媒体权限下文件可以支持历史版本,或所有内容都有历史版本可以回滚呢?数据库记录文件元数据。是否有采用价值?

@sebastienros sebastienros added this to the 1.0.x milestone Sep 9, 2021
@sebastienros
Copy link
Member Author

Can files under media permissions support historical versions

No, and there are no events to support this I believe since it's just showing what is on the filesystem. To do this you would need to create a custom content item which would store the image for each version.

@saleemhaq
Copy link

can anyone guide how we achieve like below:

#11429

If that related to above discussion can guide how i achieved that?

@Piedone
Copy link
Member

Piedone commented Mar 22, 2024

Related, or rather this is somewhat of a duplicate of: #3590.

@Piedone
Copy link
Member

Piedone commented Mar 22, 2024

Please check out this PR for an intended Secure Media feature: #15173. While this doesn't implement edit permissions for folders in itself, it does add view permissions and fixes ManageOwnMedia, so I think it's good enough.

@Piedone
Copy link
Member

Piedone commented Apr 5, 2024

A question for the people looking for secure media here about the #15173 PR:

Would it be useful for you to be able to add permissions only to the folders in the Media root, or do you need permissions for subfolders separately as well? Currently, you can only define permissions for folders in the Media root, but those permissions also apply to their subfolders. I.e., it's just that subfolders can't have different permissions than their parent folders, nor can you define permissions for any folder outside of the Media root.

@intellimedhu
Copy link

We only need to protect the Media root directories, and their subdirectories should inherit that. I think can create as many folders and permissions as necessary to properly segment the files.

@Piedone
Copy link
Member

Piedone commented Apr 5, 2024

Sounds good, thanks!

@sebastienros
Copy link
Member Author

@gvkries you stole my idea!!! Tremendous ideas ;)

@gvkries
Copy link
Contributor

gvkries commented Apr 12, 2024

@gvkries you stole my idea!!! Tremendous ideas ;)

@sebastienros I only steal from the best 😇😉

@Piedone
Copy link
Member

Piedone commented Apr 17, 2024

If anybody has any feedback on the #15173 PR, please let us know under it. Otherwise, I'll merge it in a week.

@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

Successfully merging a pull request may close this issue.

8 participants