Skip to content

Commit

Permalink
add some more rules
Browse files Browse the repository at this point in the history
  • Loading branch information
adlius committed Feb 6, 2024
1 parent 589ac54 commit 22093f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,18 @@ def resolve_guid(guid, suffix=None):
elif isinstance(resource, Registration) and (clean_suffix in ('', 'comments', 'links', 'components', 'resources',)) and waffle.flag_is_active(request, features.EMBER_REGISTRIES_DETAIL_PAGE):
return use_ember_app()

elif isinstance(resource, Registration) and clean_suffix.startswith('metadata') and waffle.flag_is_active(request, features.EMBER_REGISTRIES_DETAIL_PAGE):
return use_ember_app()

elif isinstance(resource, Registration) and (clean_suffix in ('files', 'files/osfstorage')) and waffle.flag_is_active(request, features.EMBER_REGISTRATION_FILES):
return use_ember_app()

elif isinstance(resource, Node) and clean_suffix and any(path.startswith(clean_suffix) for path in addon_paths) and waffle.flag_is_active(request, features.EMBER_PROJECT_FILES):
return use_ember_app()

elif isinstance(resource, Node) and clean_suffix and clean_suffix.startswith('metadata') and waffle.flag_is_active(request, features.EMBER_PROJECT_FILES):
return use_ember_app()

elif isinstance(resource, BaseFileNode) and resource.is_file and not isinstance(resource.target, Preprint):
if isinstance(resource.target, Registration) and waffle.flag_is_active(request, features.EMBER_FILE_REGISTRATION_DETAIL):
return use_ember_app()
Expand Down

0 comments on commit 22093f5

Please sign in to comment.