[ENG-5028] [ENG-5920] Preprints Affiliation Project PR (BE) #10745
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This is the project BE PR for Preprints Institution Affiliation.
It comprises the following PRs that were merged into the feature branch
Changes
AffiliatedInstitutionMixin
mixin toPreprint
model and overridesaffiliated_institutions
with related name.PreprintLog
save=False
inadd_affiliated_institution()
PreprintInstitutionsList
: this endpoint is read-only, use existingInstitutionSerializer
and newPreprintInstitutionPermissionList
PreprintInstitutionsRelationship
: this endpoint only allowsGET
andPUT
, uses newPreprintsInstitutionsRelationshipSerializer
and updatedWriteOrPublicForRelationshipInstitutions
PreprintsInstitutionsRelationshipSerializer
forPreprintInstitutionsRelationship
InstitutionRelated
fromnodes
toinstitutions
affiliated_institutions
toPreprintSerializer
handle_author_assertions()
WriteOrPublicForRelationshipInstitutions
fromnodes
tobase
and add a special case forPreprint
PreprintInstitutionPermissionList
: this is a permission for read-only endpointhandle_author_assertions()
Preprints.can_edit()
.nodes
toinstitutions
and added a new helperupdate_institutions_if_user_associated()
QA Notes
See project QA Planning
Documentation
See CenterForOpenScience/developer.osf.io#63, make sure we release documentation to
developer.osf.io
too.Side Effects
N/A
Ticket
Project: https://openscience.atlassian.net/browse/ENG-5028
BE: https://openscience.atlassian.net/browse/ENG-5920