-
Notifications
You must be signed in to change notification settings - Fork 175
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
[Doc Repo] Refactor to use new File Uploader class #5234
Conversation
This is accidentally based on another PR... will rebase soon. Also I didn't update the test plan but I imagine that needs to be done. |
SQL/0000-00-01-Permission.sql
Outdated
@@ -101,7 +101,8 @@ INSERT INTO `permissions` VALUES | |||
(52,'instrument_manager_write', 'Instrument Manager: Install new instruments via file upload', 2), | |||
(53,'publication_view', 'Publication - Access to module', 2), | |||
(54,'publication_propose', 'Publication - Propose a project', 2), | |||
(55,'publication_approve', 'Publication - Approve or reject proposed publication projects', 2); | |||
(55,'publication_approve', 'Publication - Approve or reject proposed publication projects', 2), | |||
(56,'document_repository_edit','Upload and edit files in Document Repository','2'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you proposing 3 doc repo permissions? Is this new document_repository_edit
permission also separate from the document_repository_delete
permission?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to separate view from edit, basically.
I'm not sure whether there should also be a delete. Maybe there is a use case where someone is allowed to edit information about doc repo files but shouldn't be able to remove them entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with separating view and upload / edit.
I'm not sure we need that much granularity in terms of edit / delete, but I'm not strictly opposed to it
TODO: Restart Travis |
#5815 also adds a document repository setting and I think that PR should go in before this one. Adding Blocked label. |
@johnsaigle is this ready for review even though needs rebase and is blocked? |
@zaliqarosli Nope it will require some changes after all these months. I'll fix it soon. |
The raisinbread files got messed up during my rebase. I'll rerun the exporter script and commit the correct results when the VMs come back. |
Co-Authored-By: Zaliqa <zaliqa.rosli@mcin.ca>
@nicolasbrossard It's working now in my local testing. Would you mind trying again? |
Works now! 👍 Approving this PR. |
Thanks for all the help! |
Brief summary of changes
document_repository_edit
to separate view and edit permissions.files
class in the doc repo moduleTesting instructions (if applicable)
documentRepositoryPath
to a writable folder on your system.document_repository_edit
permission, ensure that you can upload files..mp3
file. You should get a Sweet Alert error message.document_repository_edit
permission. You should get a 403 response when trying to upload any file.Links to related tickets (GitHub, Redmine, ...)