You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem you would like to solve
Each SubmissionFile is assigned to a file stage and this determines where the file appears and who can access it. For example, a submission file in the SUBMISSION_FILE_FINAL file stage appears in the Copyediting list of files and is only accessible to users assigned to the copyediting stage.
However, access to discussion and reviewer attachments must be granted based on discussion and review assignments rather than file stage. This makes the authorization logic more complicated, and poses problems for writing API endpoints with consistent requirements.
For example, the REST API endpoints for accessing a single submission file require a file stage to be passed. But if the file stage is SUBMISSION_FILE_QUERY or SUBMISSION_FILE_REVIEW_ATTACHMENT, additional query parameters are required. This is hard to document and leads to unexpected results in the API.
Galley files present a similar problem discussed in #6702.
Describe the solution you'd like
Discussion and reviewer attachments should be separated from the SubmissionFile system. These files should only be uploaded and stored in the files table, not the submission_files table. Access to the files would be based on existing access policies for query notes and review assignments. The REST API would provide read/write access to these files only through endpoints for reviewAssignments/{id}/files and discussions/{id}/note/{id}/files.
Pros:
Discussion and review files can have a simpler upload process since no genreId or metadata needs to be set.
Authorization policies for SubmissionFiles are simplified.
It's easy to support alternative kinds of file attachments for review files and discussions, such as public reviews of preprints, or discussion attachments for things like Google Docs.
Housekeeping:1:TodoAny dependency management or refactor that would be nice to have some day.
1 participant
Converted from issue
This discussion was converted from issue #6705 on May 31, 2022 10:40.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Describe the problem you would like to solve
Each
SubmissionFile
is assigned to a file stage and this determines where the file appears and who can access it. For example, a submission file in theSUBMISSION_FILE_FINAL
file stage appears in the Copyediting list of files and is only accessible to users assigned to the copyediting stage.However, access to discussion and reviewer attachments must be granted based on discussion and review assignments rather than file stage. This makes the authorization logic more complicated, and poses problems for writing API endpoints with consistent requirements.
For example, the REST API endpoints for accessing a single submission file require a file stage to be passed. But if the file stage is
SUBMISSION_FILE_QUERY
orSUBMISSION_FILE_REVIEW_ATTACHMENT
, additional query parameters are required. This is hard to document and leads to unexpected results in the API.Galley files present a similar problem discussed in #6702.
Describe the solution you'd like
Discussion and reviewer attachments should be separated from the
SubmissionFile
system. These files should only be uploaded and stored in thefiles
table, not thesubmission_files
table. Access to the files would be based on existing access policies for query notes and review assignments. The REST API would provide read/write access to these files only through endpoints forreviewAssignments/{id}/files
anddiscussions/{id}/note/{id}/files
.Pros:
Cons:
Who is asking for this feature?
Developers
Beta Was this translation helpful? Give feedback.
All reactions