Skip to content

Commit 63d6889

Browse files
adliusVlad0n20mkovaluaantkrytihorsokhanexoft
authored
Merge Feature/pbs 26-2 into develop (#11657)
* [ENG-10042] Fix/eng 10042 (#11551) * Update RegistrationActionSerializer * Update RegistrationActionSerializer * [ENG-9805] Service Brands should be listed alphabetically, and include service type (#11543) * get default_license_id on preprint creation to handle it on FE (looks like it is not used drafts/id/metadata) for prepints in browser url so for get request is is redundant get default_license_id on draft registration creation (to get for FE after creation) and also for GET/ request to get it on drafts/id/metadata request * implement asc sorting for admin brand tab and showing brand related unique provider types * [ENG-9122] Fix/eng 9122 (#11473) * Update share * Fix manage command * [ENG-9157] Add atomic ability to remove contributors from children projects in API (#11425) * add include_children to delete contributors * atomic contributor remove; add tests * remove from children only for nodes * fix tests --------- Co-authored-by: Yuhuai Liu <yuhuai@cos.io> * [ENG-8526] Fixed write contributor permissions on affiliation actions (#11397) * fixed affiliation update for write contributors in registrations * removed redundant blank line * fixed tests * fixed tests * fixed a test * don't expect errors in tests * [ENG-9198] Do not show page not found for preprint pending moderation (#11567) * if preprint is pending moderation show it for not contributors/moderators/Logged-out users using /pending-moderation redirection on access * update testcases to be it compatable with 'This preprint is pending moderation and is not yet publicly available.' logic * test update * test update * test update * [ENG-9043] get default_license_id on preprint creation to handle it on FE (looks like it is not used drafts/id/metadata) for prepints in browser url so for get request is is redundant (#11464) get default_license_id on draft registration creation (to get for FE after creation) and also for GET/ request to get it on drafts/id/metadata request * [ENG-9596] Server slowdown when adding many contributors (#11420) * add list_serializer_class for NodeContributorsCreateSerializer; minor optimization * add bulk add_contributor_registered_or_not method * Use DRY for NodeContributorsBulkCreateListSerializer * fix changes after notification refactor * add default email_preferences to NodeContributorsBulkCreateListSerializer * [ENG-9043] get provider default license id in serializer (#11583) * [ENG-9002] Unable to GDPR delete users with Registrations or Preprints (#11568) * update gdpr delete logic * fix test; better error handling * [ENG-8740] Ability to delete a file from a registration via admin (#11285) * [ENG-8514] Remove CSRF protection from reset password api v2 POST (#11246) * remove csrf protection from reset password endpoint * update test * add background color prop to Brand (#11254) * fix flaky test_serialized_metadata * fix throttle test * reset throttle cache * don't ignore components when create a view-only link * fixed updating subscribe_osf_general_email subscription * [ENG-7277] Update doc to include version as relationship (#11262) * added tests * [ENG-8691] Wrong server on reset password email (#11271) * use same logic for admin and web password reset * fix tests * enable filtering for linked-nodes endpoint (#11273) * remove deleted users from institutional dashboard (#11261) * fixed tests * [ENG-7803] Update text on VOL modal for registration (#11279) * add a file removal feature for a node (registration) using admin panel * delete file only for archived registration when it is not possible from user side to avoid inconsistency * remove file from scheme response blocks * delete file from registration and metadata and keep it for original project --------- Co-authored-by: antkryt <ant.krytskyi@gmail.com> Co-authored-by: John Tordoff <Johnetordoff@users.noreply.github.com> Co-authored-by: Ihor Sokhan <isokhan@exoft.net> Co-authored-by: Vlad0n20 <137097005+Vlad0n20@users.noreply.github.com> * [ENG-10074] Unable to approve account merging (#11578) * implement admin user merge as a background task * fix test * Add affiliation management for institutions and users (#11374) * [ENG-9805] implement asc sorting for admin brand tab (case insensitive) (#11591) * implement asc sorting for admin brand tab (case insensitive) * Fix indentation in brand list template * [ENG-10042] Fix/eng 10042 (#11593) Revert BE changes meant to fix 10042 and replace with FE changes. * [ENG-8515] - Add management command to manual archive (#11361) * Add management command to manual archive * fix test * Fix lints * Fix tests * [ENG-8048] Optimized GV requests (#11566) * use GV addons caching when it's needed * fixed None issue when iterate * fixed tests * [Rebase] [ENG-9177] Removed ember (#11531) * removed ember mentions of ember in docker and readme * removed ember-related constants, flags, tests and functionality * fixed redirects to unexisting index and dashboard flask views * fixed redirects * added redirect for removed views * removed assert for duplicated redirect as it'll be handled by angular * fix imports after notification refactor * fix tests * remove edit_draft_registration_page and new_draft_registration views --------- Co-authored-by: Ihor Sokhan <isokhan@exoft.net> * [ENG-9157] [AOI] Add atomic ability to remove contributors from children projects in API (#11605) * raise permission error if user is not admin on child node * fix tests * [ENG-10309] Add meta to API preprint detail view to indicate spam status (#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 tests * remove old address from email templates (#11616) * [ENG-9730] Spam data is not shared across all user's objects (#11614) * fixed not shared spam_data among user and his nodes/preprints * fixed case when resource is a user * handle hammy user cases * fixed old tests * creator is spammed instead of flagged when a node contains spam * fixed tests and case when suspend user directly thus must spam main node/preprint * capture notifications * [ENG-10405] change /myprojects to /my-projects to work good with angular (#11624) * [ENG-10464] Critical issues in yarn.lock (#11627) * remove vulnarable packages and some web ui content * add missing changes * return project template * fix tests * remove unused packages * [ENG-10384] return 409 when submit to closed registry (#11628) * Merge develop into Feature/pbs 26 2 (#11642) * [ENG-10083] Add type<-->is_digest "relation" and update subscription (#11575) * Add is_digest_type property to NotificationType and log message in emit method * Fix is_digest handling in NotificationType.emit method * Log message update in NotificationType.emit method for is_digest handling * fix unit tests --------- Co-authored-by: Ostap Zherebetskyi <ozherebetskyi@exoft.net> * Add notification subscriptions de-duplication v2 command (#11576) Co-authored-by: Ostap Zherebetskyi <ozherebetskyi@exoft.net> * [ENG-10190][ENG-10214] Permanently update a couple of templates to match admin/admin changes Update archive_size_exceeded_user and provider_reviews_resubmission_confirmation templates * Update changelog and bump version * Exclude spam and deleted Registration from queryset (#11572) * [ENG-10135] - Fix/eng 10135 (#11587) * Exclude spam and deleted Registration from queryset * Update RegistrationActionList to check deleted flag * Fix tests * Fix test * Feature/fair signposting (#11599) * linkset initial implementation * linkset initial implementation (updating data extraction and adding serialization) * and \n in EOF instead of % * update code * get file mediatype from metadata * add unittests for linkset approach (TODO: ?) * update code * update code and unit tests and * update file related code and unit tests * refactor code after CR | implement 'describes' | check file type differs from parent project / registry / preprint * update files to compare on unittests run * implement datacite - scheme type mapping for linkset draft version (need tests updates and maybe some type yield logic ) * Update osf/metadata/osf_gathering.py Co-authored-by: abram axel booth <aaxelb@users.noreply.github.com> * Update osf/metadata/serializers/linkset.py Co-authored-by: abram axel booth <aaxelb@users.noreply.github.com> * implement datacite - schema mapping * update tests expected results * resolve CR * refactor code | resolve CR * remove redundant describes from file response (#11590) * [ENG-10256] 2.1.9 BE: Fix permission issue where users without permission to an object can access the metadata (#11588) * Fix permission issue where users without permission to an object can access the metadata (add decorator is_contributor_or_public_resource) * refactor code * resolve CR | refactor code * resolve CR | add unittests * add *args, **kwargs for decorated view * [ENG-10167] 2.1.6 BE: add link header to guid metadata endpoints (#11594) * add link header to guid metadata endpoints for registry and project * update code * avoid Component Registration/Project JSON Contains type: null (#11597) * [ENG-10168] 2.1.7 BE: add link header to cedar metadata records endpoints (#11596) * add link header to guid metadata endpoints for registry and project * update code * add link header to cedar metadata records endpoints * change ResearchProject for CreativeWork for projects (#11603) * [ENG-10169] 2.1.8 BE: add link header to file download URL (#11600) * avoid Component Registration/Project JSON Contains type: null * add link header to file download URL * update unittests * resolve CR --------- Co-authored-by: mkovalua <mkoval@exoft.net> Co-authored-by: abram axel booth <aaxelb@users.noreply.github.com> * Bump versio no. Add CHANGELOG * [ENG-10054] feature/ror-migration (#11610) * feat(osf): script to migrate Crossref Funder IDs to ROR IDs * feat(osf): Fix fot the script to migrate Crossref Funder IDs to ROR IDs * feat(osf): Update OSF metadata model code and tests for ROR funder identifier support * feat(osf): Add DataCite client tests for ROR funder identifier support * feat(osf): update migration script to remove unmapped crossref funders * add another stat to the migration script --------- Co-authored-by: Andriy Sheredko <sheredko.andriy@gmail.com> * bump version & update changelog * add command to migrate ror funder names * bump version & update changelog * [ENG-10538] Post-NR Project PR (#11623) * Create global_file_updated and global_reviews subscriptions if missing * Use USER_FILE_UPDATED for group global_file_updated * Use REVIEWS_SUBMISSION_STATUS for group global_reviews * Add missing `is_digest=True` for new OSF user subscriptions * Extend otf subscription creation to apply to _node_file_updated group * Fix typo for `_is_digest` * add is_digest_type property * Add is_digest_type property to NotificationType and log message in emit method * Fix is_digest handling in NotificationType.emit method * Log message update in NotificationType.emit method for is_digest handling * fix unit tests * Move set-deafult-subscriptions out of non-effective try-except * Add fake_sent field to Notification model and update notification creation logic * add unique_together constraint * Add 'PARTIAL_SUCCESS' status to EmailTask model and update email task handling logic * NR migration [ENG-10040, ENG-10025, ENG-9854] * Remove subscription if notifications.tasks.send_moderator_email_task fails with permission error * Apply suggestion from @Ostap-Zherebetskyi * remove datetime * Add 'no_login_email_last_sent' field to OSFUser and update email task logic * Enforce and improve permission check for subscriptions * Fix typo in annotated_obj_qs for NODE_FILE_UPDATED * Add unit tests for testing node_file_updated subscription detail * Implement notifications cleanup task and related settings; add tests for functionality * Fix legacy subscription ID for NODE_FILE_UPDATED: "guid_files_updated" * Fix duplicate and mismatched type NODE_FILE(S)_UPDATED * removed email.py * Fix annotated qs for global reviews and update unit tests * Update tests for node_file(s)_updated subscription detail * Rename fixtures for notification subscription detail tests * Annotate with legacy_id for serializer to handle created subscriptions * Add unit tests for creating missing subscriptions on the fly * clear useless code * Rename migration name for NR post-release * Improve unit test: test_emit_frequency_none * Remove `seen` from `Notification` and re-make migrations * `mark_sent()` now handles `fake_sent=True`, and only `save()` once * Update default settings * remove useless import * Enhance SubscriptionList queryset with additional content types and refactor notification type handling * fix unit test * Refactor SubscriptionList queryset to use a single provider content type and update related notification handling; add script to update notification subscriptions' content types. * fix CR comments * Update comments * split into 3 files * remove populate_notification_subscriptions * Renamed files, refactor of populate notification subscriptions user global file updated * added try/except, added timers * converted populate_notification_subscriptions_user_global_reviews.py * fix batch time execution * converted populate_notification_subscriptions_node_file_updated * convert to separate update and create scripts * updated, added parameters * move to remove_after_use * add time track to last batch, fix proper time track for batch in node_file_updated * convert to use review_nt * Fix unit tests due to new constraints * Move missing subscription creation to a helper function in utils * Subscription list view now creates missing attributes on-the-fly * Note: only works for when filter on "legacy id"; logs message to sentry for tracking purpose when filter on "event names". * Fix broken `.exists()` due to complex annotated QS with `.distinct()` * fix names of tasks * Add notification subscriptions de-duplication v2 command * fix naming * Add deduplication command to notification migration * Fix notification handling by updating legacy ID suffix from '_files_updated' to '_file_updated' across utils and views; adjust related test cases accordingly. * fix unit tests * Update the name of the NotificationType NODE_FILE_UPDATED to be consistent * Rename notification type from node_files_updated to node_file_updated for consistency * clean keys * fix naming in templates, event_context * remove leftover comments * Refactor notification type references to use NotificationTypeEnum - Updated all instances of NotificationType.Type to NotificationTypeEnum in test files and application code. - Ensured consistency in notification type usage across various tests including auth, claims, events, and more. - This change improves clarity and maintainability by standardizing the notification type references. * Fix notification type reference for FILE_UPDATED * Refactor notification type references to use NotificationTypeEnum across views and scripts * fix unit tests * remove imports * fix USER_CROSSREF_DOI_PENDING event_context * sync naming * added explanation * Add Celery task to disable removed beat tasks from PeriodicTask entries * Apply suggestion from @Ostap-Zherebetskyi * Apply suggestion from @cslzchen * Add migrations to remove duplicate notification subscriptions and refactor notification model * removed comment * Refactor no-login email filtering to ensure last sent date is before last login date * Add test to exclude users logged in before no_login_email_last_sent * Refactor no-login email user filtering to exclude those with pending EmailTasks and recent no-login emails * Fix CollectionSubmission URLs to use absolute_url method for consistency * Refactor logo handling in notification methods to improve consistency and readability * Add management command to sync notification templates * Apply suggestion from @cslzchen * Add management command for deleting withdrawn or failed registration files to CeleryConfig * fix: update logo handling in send_moderator_email_task for favicon support --------- Co-authored-by: Longze Chen <cslzchen@gmail.com> Co-authored-by: Ostap Zherebetskyi <ozherebetskyi@exoft.net> Co-authored-by: Bohdan Odintsov <bodintsov@exoft.net> * Updated cut-off time and added comments for NR settings * Update changelog and bump version * resolve merge conflicts * respond to CR comments * fix tests * fix tests again --------- Co-authored-by: Longze Chen <cslzchen@gmail.com> Co-authored-by: Ostap Zherebetskyi <ozherebetskyi@exoft.net> Co-authored-by: Vlad0n20 <137097005+Vlad0n20@users.noreply.github.com> Co-authored-by: futa-ikeda <51409893+futa-ikeda@users.noreply.github.com> Co-authored-by: mkovalua <mkoval@exoft.net> Co-authored-by: abram axel booth <aaxelb@users.noreply.github.com> Co-authored-by: Fitz Elliott <fitz@cos.io> Co-authored-by: Andriy Sheredko <sheredko.andriy@gmail.com> Co-authored-by: Bohdan Odintsov <bodintsov@exoft.net> * update yarn lock (#11646) * Feature/pbs 26 2 (#11647) * update yarn lock * update admin yarn.lock * yarn with 1.22.19 (#11648) * add keen-dataviz back (#11652) * fix tests (#11659) --------- Co-authored-by: Vlad0n20 <137097005+Vlad0n20@users.noreply.github.com> Co-authored-by: mkovalua <mkoval@exoft.net> Co-authored-by: antkryt <ant.krytskyi@gmail.com> Co-authored-by: ihorsokhanexoft <isokhan@exoft.net> Co-authored-by: John Tordoff <Johnetordoff@users.noreply.github.com> Co-authored-by: Ostap-Zherebetskyi <ozherebetskyi@exoft.net> Co-authored-by: Longze Chen <cslzchen@gmail.com> Co-authored-by: futa-ikeda <51409893+futa-ikeda@users.noreply.github.com> Co-authored-by: abram axel booth <aaxelb@users.noreply.github.com> Co-authored-by: Fitz Elliott <fitz@cos.io> Co-authored-by: Andriy Sheredko <sheredko.andriy@gmail.com> Co-authored-by: Bohdan Odintsov <bodintsov@exoft.net>
1 parent 42fc461 commit 63d6889

File tree

149 files changed

+4609
-6121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+4609
-6121
lines changed

README-docker-compose.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
- When starting with an empty database you will need to run migrations and populate preprint providers. See the [Running arbitrary commands](#running-arbitrary-commands) section below for instructions.
172172
6. Start the OSF Web, API Server, and Preprints (Detached)
173173
```bash
174-
docker compose up -d worker web api admin preprints ember_osf_web gv
174+
docker compose up -d worker web api admin preprints gv
175175
```
176176
7. View the OSF at [http://localhost:5000](http://localhost:5000).
177177

@@ -181,7 +181,7 @@
181181
- Once the requirements have all been installed, you can start the OSF in the background with
182182

183183
```bash
184-
docker compose up -d assets admin_assets mfr wb fakecas sharejs worker web api admin preprints ember_osf_web gv
184+
docker compose up -d assets admin_assets mfr wb fakecas sharejs worker web api admin preprints gv
185185
```
186186

187187
- To view the logs for a given container:
@@ -270,20 +270,10 @@
270270
```bash
271271
docker compose run --rm web python3 -m scripts.parse_citation_styles
272272
```
273-
- Populate Notification Types
274-
- Needed for notifications.
275-
```bash
276-
docker compose run --rm web python3 manage.py populate_notification_types
277-
```
278-
- _NOTE: The waffle switch `POPULATE_NOTIFICATION_TYPES` needs to be turned on.
279-
- Start ember_osf_web
280-
- Needed for ember app:
281-
- `docker-compose up -d ember_osf_web`
282273
- OPTIONAL: Register OAuth Scopes
283-
- Needed for things such as the ember-osf dummy app
284-
```bash
285-
docker compose run --rm web python3 -m scripts.register_oauth_scopes
286-
```
274+
```bash
275+
docker compose run --rm web python3 -m scripts.register_oauth_scopes
276+
```
287277
- OPTIONAL: Create migrations:
288278
- After changing a model you will need to create migrations and apply them. Migrations are python code that changes either the structure or the data of a database. This will compare the django models on disk to the database, find the differences, and create migration code to change the database. If there are no changes this command is a noop.
289279
```bash
@@ -511,4 +501,4 @@ wb:
511501
512502
### Running Collections
513503
514-
To run collections, you must uncomment COLLECTIONS_ENABLED=true in docker-compose.yml under ember_osf_web, then recreate your ember and web containers.
504+
To run collections, you must uncomment COLLECTIONS_ENABLED=true in docker-compose.yml, then recreate web container.

addons/base/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -928,12 +928,12 @@ def addon_view_or_download_file(auth, path, provider, **kwargs):
928928
)
929929
)
930930

931-
# There's no download action redirect to the Ember front-end file view and create guid.
931+
# There's no download action redirect to the front-end file view and create guid.
932932
if action != 'download':
933-
if isinstance(target, Node) and flag_is_active(request, features.EMBER_FILE_PROJECT_DETAIL):
933+
if isinstance(target, Node):
934934
guid = file_node.get_guid(create=True)
935935
return redirect(f'{settings.DOMAIN}{guid._id}/')
936-
if isinstance(target, Registration) and flag_is_active(request, features.EMBER_FILE_REGISTRATION_DETAIL):
936+
if isinstance(target, Registration):
937937
guid = file_node.get_guid(create=True)
938938
return redirect(f'{settings.DOMAIN}{guid._id}/')
939939

addons/osfstorage/tests/test_views.py

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
from osf_tests.factories import ProjectFactory, ApiOAuth2PersonalTokenFactory, PreprintFactory
3838
from website.files.utils import attach_versions
39-
from website.settings import EXTERNAL_EMBER_APPS
4039
from api_tests.draft_nodes.views.test_draft_node_files_lists import prepare_mock_wb_response
4140

4241

@@ -1413,28 +1412,17 @@ def test_file_view_updates_history(self):
14131412
{'name': 'testpath', 'path': '/testpath', 'materialized': '/testpath', 'kind': 'file'},
14141413
]
14151414
)
1416-
with override_flag(features.EMBER_FILE_PROJECT_DETAIL, active=True):
1417-
url = self.node.web_url_for('addon_view_or_download_file', path='testpath', provider='github')
1418-
self.app.get(url, auth=self.user.auth)
1419-
file = GithubFile.objects.get(_path='/testpath', provider='github')
1420-
assert file.history
1421-
1422-
@mock.patch('website.views.stream_emberapp')
1423-
def test_file_views(self, mock_ember):
1424-
with override_flag(features.EMBER_FILE_PROJECT_DETAIL, active=True):
1425-
file = create_test_file(target=self.node, user=self.user)
1426-
url = self.node.web_url_for('addon_view_or_download_file', path=file._id, provider=file.provider)
1427-
res = self.app.get(url, auth=self.user.auth)
1428-
assert res.status_code == 302
1429-
assert res.headers['Location'] == f'{settings.DOMAIN}{file.get_guid()._id}/'
1430-
assert not mock_ember.called
1431-
res = self.app.get(url, auth=self.user.auth, follow_redirects=True)
1432-
assert res.status_code == 200
1433-
assert mock_ember.called
1434-
args, kwargs = mock_ember.call_args
1435-
1436-
assert args[0] == EXTERNAL_EMBER_APPS['ember_osf_web']['server']
1437-
assert args[1] == EXTERNAL_EMBER_APPS['ember_osf_web']['path'].rstrip('/')
1415+
url = self.node.web_url_for('addon_view_or_download_file', path='testpath', provider='github')
1416+
self.app.get(url, auth=self.user.auth)
1417+
file = GithubFile.objects.get(_path='/testpath', provider='github')
1418+
assert file.history
1419+
1420+
def test_file_views(self):
1421+
file = create_test_file(target=self.node, user=self.user)
1422+
url = self.node.web_url_for('addon_view_or_download_file', path=file._id, provider=file.provider)
1423+
res = self.app.get(url, auth=self.user.auth)
1424+
assert res.status_code == 302
1425+
assert res.headers['Location'] == f'{settings.DOMAIN}{file.get_guid()._id}/'
14381426

14391427
def test_download_file(self):
14401428
file = create_test_file(target=self.node, user=self.user)

addons/wiki/routes.py

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3,88 +3,18 @@
33
"""
44

55
from framework.routing import Rule, json_renderer
6-
from website.routes import OsfWebRenderer
76

87
from . import views
98

10-
TEMPLATE_DIR = './addons/wiki/templates/'
11-
129
settings_routes = {
1310
'rules': [],
1411
'prefix': '/api/v1',
1512
}
1613

1714
# NOTE: <wname> refers to a wiki page's key, e.g. 'Home'
15+
# All HTML-rendered wiki routes have been removed; only API routes remain.
1816
page_routes = {
19-
20-
'rules': [
21-
22-
# Home (Base) | GET
23-
Rule(
24-
[
25-
'/project/<pid>/wiki/',
26-
'/project/<pid>/node/<nid>/wiki/',
27-
],
28-
'get',
29-
views.project_wiki_home,
30-
OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR)
31-
),
32-
33-
# View (ID) | GET
34-
Rule(
35-
[
36-
'/project/<pid>/wiki/id/<wid>/',
37-
'/project/<pid>/node/<nid>/wiki/id/<wid>/',
38-
],
39-
'get',
40-
views.project_wiki_id_page,
41-
OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR)
42-
),
43-
44-
# Wiki | GET
45-
Rule(
46-
[
47-
'/project/<pid>/wiki/<wname>/',
48-
'/project/<pid>/node/<nid>/wiki/<wname>/',
49-
],
50-
'get',
51-
views.project_wiki_view,
52-
OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR)
53-
),
54-
55-
# Edit | GET (legacy url, trigger redirect)
56-
Rule(
57-
[
58-
'/project/<pid>/wiki/<wname>/edit/',
59-
'/project/<pid>/node/<nid>/wiki/<wname>/edit/',
60-
],
61-
'get',
62-
views.project_wiki_edit,
63-
OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR)
64-
),
65-
66-
# Compare | GET (legacy url, trigger redirect)
67-
Rule(
68-
[
69-
'/project/<pid>/wiki/<wname>/compare/<int:wver>/',
70-
'/project/<pid>/node/<nid>/wiki/<wname>/compare/<int:wver>/',
71-
],
72-
'get',
73-
views.project_wiki_compare,
74-
OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR)
75-
),
76-
77-
# Edit | POST
78-
Rule(
79-
[
80-
'/project/<pid>/wiki/<wname>/',
81-
'/project/<pid>/node/<nid>/wiki/<wname>/',
82-
],
83-
'post',
84-
views.project_wiki_edit_post,
85-
OsfWebRenderer('edit.mako', trust=False, template_dir=TEMPLATE_DIR)
86-
),
87-
]
17+
'rules': [],
8818
}
8919

9020
api_routes = {

0 commit comments

Comments
 (0)