-
Notifications
You must be signed in to change notification settings - Fork 31
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
HOTFIX: Prevent sharing of locked samples #1403
Conversation
# Conflicts: # CHANGELOG.md # src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/projects/ProjectSamplesPage.java
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 still need to test it but the code looks good. Just one change for now.
Also, one thing that I think we may want to address is should a project owner still be allowed to share their samples to their own projects. What if it's the case where a project owner wants to share the samples to another one of their own projects so they can use the sample and write back the results to it, but at the same time want to allow project collaborators to use the sample but not allow them to update any of the sample metadata etc. Since this functionality has been around quite a while we may want to check with some of the users if making this change (preventing the sharing/moving of locked samples) is alright. Thoughts? @joshsadam @ericenns
src/main/webapp/resources/js/pages/projects/samples/components/SamplesMenu.jsx
Outdated
Show resolved
Hide resolved
The original owner of the samples can go to the original project to share them to other projects. If they deleted the samples from the original project, the samples are now effectively locked and cannot be unlocked, since they would no longer be able to share them (which currently exists). This is why I am ok with this change. I doubt many people were sharing locked samples, I don't think there is anything in the documentation talking about this. |
Thanks @ericenns. Yeah it that case it definitely makes sense. I will leave it with you. I will test it out shortly but code wise it looks good to me |
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.
One other change below
src/main/webapp/resources/js/pages/projects/samples/components/SamplesMenu.jsx
Outdated
Show resolved
Hide resolved
As discussed, it was a little confusing when a user selected both unlocked and locked samples, clicked on the share button, a modal pops up to list the locked samples, then the user clicks ok and it takes you to the share page to continue sharing the unlocked samples. Update it to remove the modal listing the locked samples and rather list these samples on the share -> samples step. |
...ava/ca/corefacility/bioinformatics/irida/ria/integration/projects/ProjectShareSamplesIT.java
Outdated
Show resolved
Hide resolved
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.
👍
Description of changes
Currently in IRIDA a locked sample can be shared / moved to another project. This also includes sharing and moving with keeping the locked status. This PR addresses this by completely removing the ability to share or move locked samples.
Related issue
N/A
Checklist
Things for the developer to confirm they've done before the PR should be accepted: