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

Protect default collections of site from being deleted or broken in other ways. #245

Closed
Sebobo opened this issue Oct 25, 2024 · 2 comments · Fixed by #249
Closed

Protect default collections of site from being deleted or broken in other ways. #245

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

Comments

@Sebobo
Copy link
Member

Sebobo commented Oct 25, 2024

When an asset collection is defined as default collection for a site, it shouldn't be possible to delete it or do something that breaks that connection.

@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 please add any idea or information you might have on the topic.

@lorenzulrich
Copy link
Contributor

In a multi-site instance with site-based permissions, you will most likely use AssetCollections as an entry point for assets. The main reasons:

  • You can define a default asset collection in the Site configuration that is used for uploaded assets.
  • You can use privileges to restrict assets in given asset collections to certain roles.

I see some ways to ensure that the user cannot "lock themselves out" of their own files:

  • We could generally prevent deleting asset collections that have still related assets. This could be discussed as a general concept, however you could still get to a state where you can't manage assets - if you don't have any assets at all and delete the collection.
  • Any asset collection that is being referenced as defaltAssetCollection from a Site can never be deleted.
  • Any asset collection that is referenced by a ReadHierarchicalAssetCollectionPrivilege cannot be deleted. However, since this is based on the title of the asset collection, it can be circumvented quite easily.

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
Development

Successfully merging a pull request may close this issue.

2 participants