-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pivotal ID # 185361632: Avoid Files Modification On Public Studies #855
Pivotal ID # 185361632: Avoid Files Modification On Public Studies #855
Conversation
- Create a new stage to validate file changes - Add new permission to allow file modifications on public studies - Mark the submission as invalid in case the file validation fails - Add integration tests
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.
Looking good please check comments
...ore/src/main/kotlin/ac/uk/ebi/biostd/submission/domain/request/SubmissionRequestValidator.kt
Outdated
Show resolved
Hide resolved
...ore/src/main/kotlin/ac/uk/ebi/biostd/submission/domain/request/SubmissionRequestValidator.kt
Outdated
Show resolved
Hide resolved
...ore/src/main/kotlin/ac/uk/ebi/biostd/submission/domain/request/SubmissionRequestValidator.kt
Show resolved
Hide resolved
} | ||
|
||
@Test | ||
fun `5-8 authorized user updates public submission files`() = |
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 think we need 3 more scenarios.
- Allow pagetab files to be modified (without specific permisions).
- Allow file list metadata to be modified (without specific permisions).
- File list files can not be modified
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.
Number 1 is already there
Number 2 was added to the latest commit
Number 3 was added to an existing test case
I also added a new test to avoid removing the file list altogether
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.
maybe we shoud use @nested as all this cases are related to the same scenario.
...ore/src/main/kotlin/ac/uk/ebi/biostd/submission/domain/request/SubmissionRequestValidator.kt
Show resolved
Hide resolved
- Detect changes in pagetab files and keep count - Fix the logic used to detect changes in the submission files - Improve integration tests - Improve code readability - Remove unused code
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.
LGTM please consider minor changes before merge
@@ -5,6 +5,7 @@ enum class AccessType { | |||
ATTACH, | |||
UPDATE, | |||
DELETE, | |||
UPDATE_PUBLIC, |
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.
in the future I think we may split this change in two tickets:
- Prevent non page tab files to be deleted
- Allow delete files annotation.
...ore/src/main/kotlin/ac/uk/ebi/biostd/submission/domain/request/SubmissionRequestValidator.kt
Show resolved
Hide resolved
} | ||
|
||
@Test | ||
fun `5-8 authorized user updates public submission files`() = |
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.
maybe we shoud use @nested as all this cases are related to the same scenario.
- Improved testing - Updated FTP dependency
Remove unnecessary unit tests
https://www.pivotaltracker.com/story/show/185361632