Allow users with 'can_modify_folder' permission to delete items in libraries #18924
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the permissions logic in the library folder interface to allow users with the
can_modify_folder = true
permission to delete items within a library folder. Previously, only administrators could delete items from library folders, even if a user had the permission to modify the folder. This limitation prevented users who manage specific libraries from fully maintaining their content.Specifically, it modifies the canDelete computed property so that any user who can modify a folder can also delete items inside it. In addition, I included the
manage_library_role_list
component in the library permissions interface, which was previously missing. This allows administrators to assign roles/accounts that can manage the library, which is required for deletion of items inside a library.Change permission "manage" to user account via admin interface:
Delete button appears in users library:
Succesful deletion of an item:
If the user loses the add, modify and manage permission...
...all relevant buttons disappear:
How to test the changes?
License