-
Notifications
You must be signed in to change notification settings - Fork 327
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
[Need QA Prep] Feature/The Node-Preprint Divorce [PLAT-555][PLAT-480][PLAT-559][PLAT-561][PLAT-1168] #8640
Closed
pattisdr
wants to merge
238
commits into
CenterForOpenScience:develop
from
pattisdr:feature/node-preprint
Closed
[Need QA Prep] Feature/The Node-Preprint Divorce [PLAT-555][PLAT-480][PLAT-559][PLAT-561][PLAT-1168] #8640
Changes from 1 commit
Commits
Show all changes
238 commits
Select commit
Hold shift + click to select a range
eec5f53
Copy over all necessary behavior to preprint
b9af62b
Add PreprintContributor model
4887176
Add missing imports
6fa68dd
Update references from Contributor to PreprintContributor
a3c8ab6
Comment out logs for now, fix naming in methods (node->preprint)
61cffe0
Comment out more logs for now
e710244
Build migration template
2b936ca
Write initial versions of migrations
3765e3d
Copy over relevant contributor tests from node tests
2a07f1f
Update tests to reference preprints instead of nodes
49ea52f
Optimize preprint updates
d8bda8f
Fix tests, add missing imports, fix nonexistent variable references
54ac459
Update tests
592d480
finish most change and add migrations
chennan47 d7abc9b
permission change
chennan47 8acd0e8
Update preprint model to pass more tests
64b6590
Merge branch 'feature/node-preprint-divorce-models' into feature/node…
cameronblandford 4d9434f
Merge pull request #3 from chennan47/feature/node-preprint
cameronblandford 21ad0dd
Revert "Merge pull request #3 from chennan47/feature/node-preprint"
5a44492
fix test
chennan47 29b1ed2
merge
chennan47 5e8b821
Update data migration
44e0b7c
Change node refs to preprint refs in model methods
e3d926c
update the script
chennan47 86f3622
wip
chennan47 b3544bc
a bit refine
chennan47 e1df58a
improve permission class
chennan47 5e052f1
change
chennan47 64502e9
finish refactor code
chennan47 69c64c1
fix flake 8
chennan47 9260275
fix migrations
chennan47 bdf8597
merge
chennan47 961378c
merge migration
chennan47 f274c4e
fix null value for description
chennan47 3af2b2f
fix flake 8
chennan47 2cdd3f9
remove the save
chennan47 750f64e
fix set up
chennan47 dad2424
try save again
chennan47 f7efea8
move when the contributor is created
chennan47 62cc3c5
remove debug
chennan47 c7aac6d
merge
chennan47 7ba9757
some code fix
chennan47 2514170
fix for migration script and change the naming for admin preprint per…
chennan47 5fc9320
finish fix for other than migration script
chennan47 75ec7c0
merge
chennan47 5e991c9
small merge fix
chennan47 a7df58a
update the migration script
chennan47 a2acafc
fix the migration script for permission group
chennan47 c1c9139
reponse to code review
chennan47 cce8387
Start migration cleanup.
pattisdr 41f1992
Modify PreprintContributor model so read, write, and admin are no lon…
pattisdr 5bc0715
Modeling changes for NodePreprint divorce.
pattisdr f7fbd07
Rename PreprintService model to Preprint model, add migrations for Pr…
pattisdr 03e494d
Add a data migration for adding the users from the old preprintservic…
pattisdr 359bea7
Add an add_preprint_log method in the LoggableMixin and add logging t…
pattisdr 683bebe
Add spam checks on preprint title and description and update elastic …
pattisdr 5dd0fcc
Add partial index on node and provider where node is not null.
pattisdr 7d6500d
Add population of new preprint fields to node-preprint divorce data m…
pattisdr 9d08390
Add newest preprint fields to data migration and add reverse migratio…
pattisdr a7564b2
Start efforts on migrating preprint date modified off of node, and up…
pattisdr 299c6a6
Merge branch 'review/erin/upload_to_anything' into feature/node-preprint
pattisdr 0011ae1
Merge files on anything work, shuffle around migrations.
pattisdr cf523c9
Restore UploadMixin from @erinspace commit 0074c6036f7b8043a9c91f1eb8…
pattisdr 477c4e0
Modifications to get file uploading to a preprint semi working.
pattisdr 4d745fa
Add tests for preprint properties.
pattisdr 0153f4a
Add some preprint model tests, correct issues on preprint model where…
pattisdr 5d376e2
Add spam tests for preprint and improve spam methods on Preprint model.
pattisdr 335482a
Move more node model tests over to preprints.
pattisdr 73a12d7
Modify existing preprint tests tests/test_preprints.py to reflect tha…
pattisdr bc42ab1
Update elastic search after saving title, description, preprint_file,…
pattisdr 30b1cd7
Add _is_preprint_orphan and _has_abandoned_preprint fields to the Pre…
pattisdr 21af518
Remove newly added preprint signals and use existing contributor_adde…
pattisdr aefdc8b
Modify is_preprint_primary methods on OstStorageFile to be looking fo…
pattisdr 782cd09
Check to see if file target has is_deleted, archiving, or deleted att…
pattisdr 2596109
Modify has_permission to see if user is in a specific group instead o…
pattisdr 1f52890
Revert has_permission on the model to use has_perm instead of checkin…
pattisdr 786efab
Revert temporary changes to test_module.
pattisdr a631f84
Consolidate preprint model tests in osf_tests/test_preprint.py
pattisdr 9a4f380
API changes for Node-Preprint Divorce - making a preprint distinct fr…
pattisdr 487cc06
Allow creating/updating preprints via APIv2 without requiring a node.
pattisdr 2cb6eb1
Modify APIv2 preprint tests regarding separating preprint from node a…
pattisdr 1c9bca8
Node-preprint divorce tests changes - reflecting that important infor…
pattisdr 8de7274
Change serialization of preprints in admin app.
pattisdr 10f8ee9
Add tests for osfstorage hooks for moving preprints files.
pattisdr b4dd2ba
Allow notificationsubscription to store preprint.
pattisdr 1d5e556
When looking at addon_view_or_download_file, only fetch addon if it i…
pattisdr 7f3625c
Add a Preprint > Files API v2 relationship and make osfstorage files …
pattisdr 559f330
Fix old error where permissions were not being checked on IdentifierD…
pattisdr 74d1f43
Remove _has_abandoned_preprint and _is_preprint_orphan fields from pr…
pattisdr b26a418
Optimizations and changes from code review
erinspace 707338a
Verifying API Permissions.
pattisdr 81df85a
Add PreprintCitationDetail and PreprintCitationStyleDetail GET permis…
pattisdr dfd860f
Add permission tests for accessing a primary file in the preprint.
pattisdr 7404167
Restrict preprint files list endpoint so only primary file is returne…
pattisdr 0a0133a
Add more tests for filtering nodes for preprints - preprints must be …
pattisdr 6084402
Add PreprintProvidersList endpoint that displays osfstorage provider …
pattisdr f9130da
Move attaching node to preprint to update method instead of create me…
pattisdr 0b20771
Improve preprint filtering on nodes to use the same logic as api/base…
pattisdr 3abb6d2
Deprecate prepriint field on node and node_is_public on preprint.
pattisdr 8e2f286
Add preprint-specific scopes to preprint views now that node and prep…
pattisdr 2401b34
Merge erinspace/upload_to_anything.
pattisdr 55e4aa6
Move setting supplemental project to preprint model.
pattisdr 3b19ded
Expand write user preprint permissions and prevent filtering on depre…
pattisdr a80eb24
Update preprint write permissions so they can now edit many aspects o…
pattisdr a271afb
Update default region on a preprint to be the user settings region of…
pattisdr c249c46
Make preprints elasticsearch changes.
pattisdr 5c0ad7a
Add some osfstorage tests for preprints.
pattisdr 9ce1407
Hide comment links on file if file is a preprint file.
pattisdr 8fe6b06
Modify create_waterbutler_log to work for preprints as well.
pattisdr ef37d25
Merge erinspace/uploads_to_anything.
pattisdr 6d057f2
Update preprint_node_divorce data migration to add new fields we need…
pattisdr 9800776
Fix items mixed in erinspace/upload_to_anything merge with node_prepr…
pattisdr b588d06
Attempt to not override preprint auto_now field.
pattisdr a07612a
Node-Preprint data migration fixes.
pattisdr 4a05388
DRY node-preprint divorce code.
pattisdr df7ce38
Consolidate contributor methods on the node and preprint models into …
pattisdr 7fed2aa
Non-Ember Frontend Changes for Node/Preprint Divorce
pattisdr ef620d7
Remove preprint-related model fields off of the Node.
pattisdr 99c8e17
Merge branch 'files-on-anything' into feature/node-preprint and add m…
pattisdr 5b9de71
Preprints Elastic Search updates.
pattisdr e8334b9
Handle case where a node doesn't have a preprint file when migrating …
pattisdr 9c75c2e
Optimize node-preprint divorce in SQL.
pattisdr 751e409
Small CR changes for node-preprint divorce.
pattisdr 187544d
Modify waterbutler v2 MoveFileMetadataView and CopyFileMetadataView t…
pattisdr bf2a65b
Modify waterbulter_opt_hook, as there is a discrepancy between what w…
pattisdr 3da67e3
Self-review tweaks to node-preprint divorce.
pattisdr be1730b
Merge feature/files-on-anything. Rearrange migrations, update spam c…
pattisdr 868e523
Reverse order of nested fields. Wrap ShowIfVersion around HideIfWith…
pattisdr 8dbcdf3
Remove retracted from verified_publishable definition.
pattisdr f273714
Modify project page preprint banner to more closely match collections…
pattisdr c5ae763
Add preprints withdrawn filters to preprint queries.
pattisdr 21a666f
Prevent non-contributors from accessing preprint files on withdrawn p…
pattisdr 6fb747b
- Code review cleanup.
pattisdr ff4d533
Node-preprint divorce code review cleanup.
pattisdr ad917a3
Move more class-checking logic off of methods on addons/base/views to…
pattisdr 981b0af
- Add bulk updating files for elastic search migration
pattisdr 0c872a8
More NPD CR changes:
pattisdr 05f0403
Merge branch 'feature/files-on-anything' of https://github.com/Center…
pattisdr 8601f2c
Merge branch 'feature/files-on-anything' of https://github.com/Center…
pattisdr 77b5d51
Mock different mail call.
pattisdr 44b3346
Change mocking on preprint tests; osf_admin_change_status_identifier …
pattisdr 80eb0ba
Revert `update_or_enqueue_on_preprint_updated` to call postcommit tasks.
pattisdr 7082dad
Return date_published as issued date for preprints, otherwise omit th…
pattisdr 1fce58c
Merge branch 'feature/files-on-anything' of https://github.com/Center…
pattisdr d84be3c
Remove unneeded merge migration (pulled files-on-anything just added)…
pattisdr 446ec83
Remove constraint of one preprint per provider per node.
pattisdr 4453504
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 0d7f237
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 5c5598d
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr b97a5d7
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 3f790cd
Make fetch_from_waterbutler more generic so it will work with preprints.
pattisdr 69af1b9
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 8b113a7
Add osfstorage region property to preprint model and fix `get_auth` m…
pattisdr 73205ef
Remove bad tests added in merge.
pattisdr 5d90f5c
Modify test to expect new response.
pattisdr 9e227ed
Merge branch 'develop' into feature/node-preprint
sloria 4e538a5
Increase title validator to allow 512 characters.
pattisdr 0ef54f2
Merge branch 'feature/node-preprint' of https://github.com/pattisdr/o…
pattisdr de0e684
Create primary_file guid when it is set on the preprint. Currently n…
pattisdr 44a5b95
Adjust tests regarding maximum node title length being increased to 5…
pattisdr 0c48998
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 60d0877
Shift migrations.
pattisdr 45aa40d
Add PreprintNodeRelationship endpoint so the node can be unset from t…
pattisdr 3cb6e1d
Expose node relationship self link on preprints serializer.
pattisdr b164de8
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr a520e94
Move migrations forward.
pattisdr ee9bb30
Allow unsetting the original_publication_date, for when the date was …
pattisdr 90eb793
Add more backend preprint node divorce tweaks:
pattisdr d71655e
Modify _kwargs_to_nodes so preprints can be loaded.
pattisdr 7d26297
Minor bug fixing:
pattisdr b7d8e77
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 2609f89
Fix node regions -> preprint regions not being properly migrated.
pattisdr bd0fd1a
Get_resource for context data errors are not bubbling, and causing 50…
pattisdr 94477f9
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr cd772b2
Call get_resource instead of get_node so view can be shared with prep…
pattisdr 8427dad
Allow adding an unregistered contributor with a guid/fullname combo.
pattisdr f7d0dbe
Modify preprint divorce migration to only migrate over node spam if p…
pattisdr f4517f3
Remove abandoned preprints from MyProjects page.
pattisdr 6e4c695
Fix Celery=True issues.
pattisdr 51f5d41
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 3556297
surface error message so that it does not simply say 500
adlius bf594e7
Fix tests.
pattisdr 7fa345e
Don't check if doi exists before calling update_or_enqueue_on_resourc…
pattisdr b9134bc
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 1d8b541
Rollback check for self.get_identifier_value('doi') before calling u…
pattisdr 46ea8b8
change email template
adlius eff8f52
Merge branch 'feature/node-preprint' into feature/claim-user
adlius b7548f7
Merge pull request #14 from adlius/feature/node-preprint
pattisdr 5759acc
Tweaks to legacy divorce delete and private warnings.
pattisdr 04fc03c
Merge branch 'feature/node-preprint' of https://github.com/pattisdr/o…
pattisdr 32862b5
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr e249fa8
Add merge migration.
pattisdr dee92d8
Update temporary elastic search migration script to use async=False t…
pattisdr 84ec46f
Remove logging and call setup_django(). Dry run not necessary.
pattisdr 8fdd859
Improve is_preprint_orphan property so preprints with deleted primary…
pattisdr 700528b
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 7c2f462
Add another merge migration.
pattisdr 070d858
Merge pull request #13 from adlius/feature/claim-user
pattisdr b4e071e
Adding test for @adlius claim-user feature, testing that HTTPError is…
pattisdr 289fc36
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 4c465a8
Merge branch 'develop' into feature/node-preprint
sloria 5c89ca4
Add merge migration
sloria f364f4f
Fix recording impact metrics
sloria 5efc337
Remove node references from reviews emails.
caseyrollins 2402d9f
Merge pull request #15 from caseyrollins/feature/fix-reviews-emails
pattisdr fd812d9
Change Open Science Framework to OSF Preprints similar to frontend ht…
pattisdr 7b6b9f2
Remove preprints in initial states from preprint lists.
pattisdr f4ecdb8
Load guid instead of AbstractNode so digest will work for both a node…
pattisdr 88f02fb
Exclude preprints from queryset from account/register in the admin app.
pattisdr 4cfed9f
Exclude preprints from admin app > user groups selection.
pattisdr ba60e48
Merge branch 'develop' into feature/node-preprint
sloria a699674
Fix passing async_update; fix flake8 errors; fix tests
sloria d463aca
Allow moving preprints into collections.
pattisdr b01cb77
When double-clicking on a preprint in the dashboard, don't attempt to…
pattisdr 974c52a
Add data migration so preprints can be added to existing collections.
pattisdr 8729e75
Update PageCounter entries in preprint migration.
caseyrollins adf5796
Merge pull request #17 from caseyrollins/feature/node-preprint
pattisdr 89df1bf
Prevent preprint django groups (even though they are hidden), from be…
pattisdr e75a73f
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 849436f
Add a merge migration.
pattisdr 59c2fea
Consolidate CollectionPreprintsMixin with CollectionMixin and general…
pattisdr e1e350c
Merge pull request #18 from pattisdr/feature/PLAT-1190preprints-colle…
pattisdr 384a871
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr cfdc9f9
Shuffle migrations.
pattisdr 2fcf15b
Add CollectionMixin to CollectionList view.
caseyrollins fa3716b
Merge pull request #21 from caseyrollins/fix/preprint-collections
pattisdr dd2a7a1
Only show preprint's status to contributors. PLAT-1225
pattisdr ab77d75
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
pattisdr 2436dbe
Add merge migration.
pattisdr f3c6980
Adjust preprint banner tests to reflect that noncontribs don't see pr…
pattisdr 80996ef
Fix for digest emails
sloria 108859b
Merge branch 'develop' into feature/node-preprint
sloria 0827696
Allow implicit admins to see status of attached preprint on project p…
pattisdr 44d9a4d
Bugfix - only show warning message for making supplemental project pr…
pattisdr 732dcbf
Bugfix for `is_preprint_primary` property.
pattisdr 6d44523
Bugfix both project contributors and implicit admins should be able t…
pattisdr 15e3b3e
Allow registered users to claim a user on a preprint.
pattisdr e1852c4
Use the Collection.collected_types through table to bulk add preprint…
pattisdr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -665,7 +665,7 @@ def check_external_auth(user): | |
|
||
@block_bing_preview | ||
@collect_auth | ||
@must_be_valid_project | ||
@must_be_valid_project(preprints_valid=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
def claim_user_registered(auth, node, **kwargs): | ||
""" | ||
View that prompts user to enter their password in order to claim being a contributor on a project. | ||
|
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.
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.
must_be_valid_project
was modified as a part of the divorce ifpreprints_valid=True
passed in, then it would work for preprints. called_inject_nodes
will add kwargs['node'] = Preprint object. Thenclaim_user_registered
will have the Preprint object asnode
, and all methods in that function will work for a node or preprint.There might be some confusion over "node" language referring to a preprint - at some point, we might want to generalize the language in a few places that nodes and preprints both use, (resource, or similar), but I think this is low priority.