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

Prevent adding assets to "all" if user has only privilege to see some collections. #246

Closed
Sebobo opened this issue Oct 25, 2024 · 4 comments · Fixed by #251
Closed

Prevent adding assets to "all" if user has only privilege to see some collections. #246

Sebobo opened this issue Oct 25, 2024 · 4 comments · Fixed by #251
Assignees
Labels
Bug Something isn't working

Comments

@Sebobo
Copy link
Member

Sebobo commented Oct 25, 2024

Description

Currently when a user adds an asset to the virtual "all" collection, meaning no collection, but can only see a certain set of collections, the asset is not visible to them after upload.

Steps to Reproduce

  1. Restrict role to only see one collection
  2. Upload asset to "all"

Expected behavior

The asset goes to their first accessible collection or they cannot select "all".

Actual behavior

The asset disappears

@Sebobo Sebobo added the Bug Something isn't working label Oct 25, 2024
@Sebobo Sebobo self-assigned this Oct 25, 2024
@Sebobo
Copy link
Member Author

Sebobo commented Oct 25, 2024

@lorenzulrich do you think we should hide/disable the "All" collection or change its behaviour to match the users privileges?

@lorenzulrich
Copy link
Contributor

I'm not sure if there is a "one size fits all approach" to this.

Some considerations

  • When I create a new multi-site website with one asset collection per site and respective privileges, even as an admin I might not want to have the virtual "All" collection because I might add assets to places where my editors couldn't see them.
  • However, when I'm changing an existing single-site website to a multi-site, I need to see "All" assets (basically such without an asset collection) so I can "move" them to the appropriate place.

Currently, I'd be in favour of having a privilege for the "All" entry point so I could leave it on for an admin if necessary, but deactivate it for editors.

@Sebobo
Copy link
Member Author

Sebobo commented Oct 28, 2024

One problem is also the upload mechanism.

During upload in the module I would need to check for collections and whether uploads without collection are allowed. But in the image editor this couldn't not be prevent right now I think, or how do you handle this?

@lorenzulrich
Copy link
Contributor

Are we talking about direct upload in the Image Editor?

We always disable this, since it contributes to creating a mess. However, not everyone might feel the same ;-).

As far as I know, image upload uses the default asset collection if defined. Clearly, indepentent of the solution chosen, we need some instructions on how to set this up and the default behaviour should not hide the "All" asset collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
2 participants