-
Notifications
You must be signed in to change notification settings - Fork 65
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
Author can "delete" any article file from the do_revision view #1617
Comments
Reviewing this as I was about to implement it, I wonder what the use-case is for an author to be able to delete (even when meaning to disassociate) a file from the article.
Could the original issue be resolved by simply removing the delete button from the author's view of the page, so that they can't disassociate any of the files? |
I think the main issue here is that they can do it to any file, not just the ones they have access to. |
But should they be able to disassociate any file in the first place? What reason would they have to be able to do that to any file? |
The most obvious example to me would be if a figure file had been removed from the MS they'd want to remove the record in Janeway. |
Note from pair session: The draft PR (#4366) appears to be working. To test it: Create a revision request |
Describe the bug
From the
do_revision
view, authors can delete previously uploaded files. The files themselves are not deleted, but rather unlinked from the article object.There are no permissions checked against the file before it gets "deleted" so the author could tweak the posted
file_id
and potentially "delete" any file in the articleJaneway version
v1.3.8
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be form validation, in this view, ensuring the author can only "delete" their own files
Bonus points: Rename
file.delete_file
to something that actually describes the function behaviour.Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: