diff --git a/swh/web/tests/deposit/test_app.py b/swh/web/tests/deposit/test_app.py index 791f90bc..f5ed8cf7 100644 --- a/swh/web/tests/deposit/test_app.py +++ b/swh/web/tests/deposit/test_app.py @@ -1,32 +1,32 @@ # Copyright (C) 2022 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU Affero General Public License version 3, or any later version # See top-level LICENSE file for more information import pytest from django.urls import get_resolver from swh.web.deposit.urls import urlpatterns from swh.web.tests.django_asserts import assert_not_contains from swh.web.tests.helpers import check_html_get_response from swh.web.utils import reverse @pytest.mark.django_db -def test_deposit_deactivate(client, staff_user, django_settings): +def test_deposit_deactivate(client, admin_user, django_settings): """Check Add forge now feature is deactivated when the swh.web.deposit django application is not in installed apps.""" django_settings.SWH_DJANGO_APPS = [ app for app in django_settings.SWH_DJANGO_APPS if app != "swh.web.deposit" ] url = reverse("swh-web-homepage") - client.force_login(staff_user) + client.force_login(admin_user) resp = check_html_get_response(client, url, status_code=200) assert_not_contains(resp, "swh-deposit-admin-item") add_forge_now_view_names = set(urlpattern.name for urlpattern in urlpatterns) all_view_names = set(get_resolver().reverse_dict.keys()) assert add_forge_now_view_names & all_view_names == set() diff --git a/swh/web/webapp/templates/layout.html b/swh/web/webapp/templates/layout.html index a54c74d9..f411dc34 100644 --- a/swh/web/webapp/templates/layout.html +++ b/swh/web/webapp/templates/layout.html @@ -1,329 +1,331 @@ {% comment %} Copyright (C) 2015-2022 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} {% load js_reverse %} {% load static %} {% load render_bundle from webpack_loader %} {% load swh_templatetags %} {% block title %}{% endblock %} {% render_bundle 'vendors' %} {% render_bundle 'webapp' %} {% render_bundle 'guided_tour' %} {{ request.user.is_authenticated|json_script:"swh_user_logged_in" }} {% include "includes/favicon.html" %} {% block header %}{% endblock %} {% if swh_web_prod %} {% endif %}
{% if "swh.web.banners" in SWH_DJANGO_APPS %}
{% include "hiring-banner.html" %}
{% endif %}
{% if swh_web_staging %}
Staging
v{{ swh_web_version }}
{% elif swh_web_dev %}
Development
v{{ swh_web_version|split:"+"|first }}
{% endif %} {% block content %}{% endblock %}
{% include "includes/global-modals.html" %}
back to top