From 269f32d45525efec3c09ce945a4f3048d53432a9 Mon Sep 17 00:00:00 2001 From: Tobias Kampmann <138436052+TobiasKampmann@users.noreply.github.com> Date: Tue, 9 Jan 2024 14:32:06 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Fabian Engelniederhammer <92720311+fengelniederhammer@users.noreply.github.com> --- README.md | 2 +- backend/docs/runtime_view.md | 3 ++- .../backend/controller/SubmissionControllerDescriptions.kt | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 33fb6cadd..1466c79b1 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ For testing we added multiple users to the realm. The users are: ### Group management - Groups are entities managed by the backend, uniquely identified by a name. - - Sequence entries are owned by a group, any modification to a sequence entry must be authorized by a member of the group. + - Every sequence entry is owned by the group that it was initially submitted for. Modifications (edits while staging, revisions, revocations) can only be made by members of that group. - Each user can be a member of multiple groups. - Users can create new groups, becoming the initial member automatically. - Group members have the authority to add or remove other members. diff --git a/backend/docs/runtime_view.md b/backend/docs/runtime_view.md index 252a8b0b9..9dd18727d 100644 --- a/backend/docs/runtime_view.md +++ b/backend/docs/runtime_view.md @@ -50,7 +50,8 @@ The following diagram shows the different statuses and their transitions. The ** To revise a sequence entry that has been released (i.e., the status is APPROVED_FOR_RELEASE), the user calls the `/revise` endpoint and sends accessions and unpreprocessed data. -For each revised sequence entry, the user has to be part of the group for which the entry was initially submitted. Then a new row in the "sequenceEntries" table is created. +For each revised sequence entry, the user has to be part of the group for which the entry was initially submitted. +Then a new row in the "sequenceEntries" table is created. It does not change any existing rows and does not create new accessions. The new rows have an incremented version number. diff --git a/backend/src/main/kotlin/org/loculus/backend/controller/SubmissionControllerDescriptions.kt b/backend/src/main/kotlin/org/loculus/backend/controller/SubmissionControllerDescriptions.kt index f4ccc2a9e..4801d206f 100644 --- a/backend/src/main/kotlin/org/loculus/backend/controller/SubmissionControllerDescriptions.kt +++ b/backend/src/main/kotlin/org/loculus/backend/controller/SubmissionControllerDescriptions.kt @@ -115,12 +115,11 @@ The user submits data on behalf of a group that they must be a member of. const val REVISE_DESCRIPTION = """ Submit revised data for new accession versions as multipart/form-data. The following rules apply: - Given sequence entries must exist (identified by the column 'accession' in the metadata file) - - The user has the right to revise all of the sequence entries (the user is part of the group for that a sequence -entry was initially submitted) + - The submitting user is member of the group that a sequence entry was initially submitted for. - The last accession version is in status 'APPROVED_FOR_RELEASE', i.e. revisable - The provided files contain only specified content -If any of above does not apply, this will return an error and roll back the whole transaction. +If any of above is not fulfilled, this will return an error and roll back the whole transaction. """ const val DELETE_SEQUENCES_DESCRIPTION = """