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

Fix permission for Observer role in Media Library #1968

Closed
MizukiTemma opened this issue Dec 13, 2022 · 0 comments · Fixed by #1988
Closed

Fix permission for Observer role in Media Library #1968

MizukiTemma opened this issue Dec 13, 2022 · 0 comments · Fixed by #1988
Assignees
Labels
🐛 bug Something isn't working
Milestone

Comments

@MizukiTemma
Copy link
Member

Describe the Bug

Currently users with role "Observer" can replace files in the media library, and a network error occurs when they try to delete a file.

However, they should not be allowed to delete or replace any files. Only uploading shoud be possible for them.

Steps to Reproduce

  1. Upload some files as root user.
  2. Log out once and log in as observer.
  3. Go to Media Library.
  4. Try to delete/replace a file.

Expected Behavior

Buttons "Replace file" and "Delete file" are not available for observers, and replacing/deleting requests will be rejected if the user is an observer.

Actual Behavior

The buttons are shown, deleting will be rejected but triggers a network error, replacing will not be rejected.

Additional Information

Add also a warning "You don't have permission to delete or replace files but you can upload files" on the top part of the media library, as in the page tree, poi/event lists.

Traceback
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.

1 participant