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

Allow users with 'can_modify_folder' permission to delete items in libraries #18924

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

npinter
Copy link
Contributor

@npinter npinter commented Oct 2, 2024

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:
grafik

Delete button appears in users library:
grafik

Succesful deletion of an item:
grafik

If the user loses the add, modify and manage permission...
grafik

...all relevant buttons disappear:
grafik

How to test the changes?

  • This is a refactoring of components with existing test coverage.

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 24.2 milestone Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant