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

No message when user has no right to delete attachment #5323

Closed
JtheBAB opened this issue Nov 14, 2024 · 2 comments
Closed

No message when user has no right to delete attachment #5323

JtheBAB opened this issue Nov 14, 2024 · 2 comments

Comments

@JtheBAB
Copy link

JtheBAB commented Nov 14, 2024

Describe the Bug

A user complained that he edited a page and wanted to delete an attachment. He clicked on the delete button for the attachment, confirm it but nothing happen. It turned out that the permission setting in the group was "own". Changing to "all" and he could delete the attachment in question. I guess the attachment was uploaded by another person.

Steps to Reproduce

Check that the group setting for attachment is "onw".
Edit a page as user A and upload an attachment
Save it
Edit the page as user B and try to delete the attachment. You can confirm the deletion but the attachment is still there.

Expected Behaviour

Bookstack should provide a message why that attachment can't be deleted.

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v24.10.2

@ssddanbrown ssddanbrown added this to the Next Feature Release milestone Nov 14, 2024
@ssddanbrown
Copy link
Member

Thanks @JtheBAB for reporting.
Ultimately, the user shouldn't be provided the option in the first place if they don't have the permissions to perform the action.

I've assigned to be addressed for the next feature release.

ssddanbrown added a commit that referenced this issue Dec 11, 2024
Added test to cover.
Also migrated related ajax-delete-row component to ts.

For #5323
@ssddanbrown
Copy link
Member

This has now been addressed in fcf0bf7, so that controls are not shown if the user does not have permission to use them. This will be part of the next feature release.

Thanks again for reporting @JtheBAB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants