Commit b673c5f
[ENG-10309] Add meta to API preprint detail view to indicate spam status (CenterForOpenScience#11604)
* indicate if the preprint is spammy with meta: {flagged_content: true}
* make sure that the sitemap doesn’t include any spammy preprint.
* update generate sitemap test
* get base get_meta in child meta to keep all needed meta data
* exclude spam content for preprints sitemap
* unify server response on getting specific registry/node/preprint if it is spammy to make it possible to create info page on front end
* exclude spam from Nodes and Registrations on sitemap generation
* avoid errors for objects where spam may not be determined
* update code
* show more specific message for spammy resource on contributor access {'flagged_content': True} to render specific UI to show contributor how to get support to ham the resource
* implement unittests for spammy resource contributor access
* refactor code
* show if resource is spammed on retrieval to all types of user
* add tests
* ensure that the sitemap is working correctly for spammed content
* Delete api_tests/preprints/views/test_preprint_detail_new_behaviors.py
remove not needed test
* raise Gone for deleted not spammed preprint to keep it same as for other deleted resources
* change 404 to 410 for deleted preprints in tests
* change 404 to 410 for deleted preprints in tests1 parent 9803821 commit b673c5f
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
| |||
0 commit comments