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 7336b71
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,10 @@ def resolve_guid(guid, suffix=None):
return stream_emberapp(EXTERNAL_EMBER_APPS['preprints']['server'], preprints_dir)
return use_ember_app()

elif isinstance(resource, Registration) and (clean_suffix in ('', 'comments', 'links', 'components', 'resources',)) and waffle.flag_is_active(request, features.EMBER_REGISTRIES_DETAIL_PAGE):
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):
Expand All @@ -345,6 +348,9 @@ def resolve_guid(guid, suffix=None):
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 7336b71

Please sign in to comment.