From d10562e9fcd2354463dcf4be1782276588fbb962 Mon Sep 17 00:00:00 2001 From: Joel Falknau Date: Sat, 28 Dec 2024 14:15:09 +1000 Subject: [PATCH] remove more bs3 fallback remnants --- allianceauth/authentication/urls.py | 1 - allianceauth/authentication/views.py | 9 ------ .../menu/tests/integration/test_dashboard.py | 32 ------------------- 3 files changed, 42 deletions(-) diff --git a/allianceauth/authentication/urls.py b/allianceauth/authentication/urls.py index 72bc1e10..9f9075a7 100644 --- a/allianceauth/authentication/urls.py +++ b/allianceauth/authentication/urls.py @@ -38,7 +38,6 @@ urlpatterns = [ name='token_refresh' ), path('dashboard/', views.dashboard, name='dashboard'), - path('dashboard_bs3/', views.dashboard_bs3, name='dashboard_bs3'), path('task-counts/', views.task_counts, name='task_counts'), path('esi-check/', views.esi_check, name='esi_check'), ] diff --git a/allianceauth/authentication/views.py b/allianceauth/authentication/views.py index 392a0a44..ba311cfa 100644 --- a/allianceauth/authentication/views.py +++ b/allianceauth/authentication/views.py @@ -392,12 +392,3 @@ def esi_check(request) -> JsonResponse: "data": check_for_override_esi_error_message(_r) } return JsonResponse(data) - - -@login_required -def dashboard_bs3(request): - """Render dashboard view with BS3 theme. - - This is an internal view used for testing BS3 backward compatibility in AA4 only. - """ - return render(request, 'authentication/dashboard_bs3.html') diff --git a/allianceauth/menu/tests/integration/test_dashboard.py b/allianceauth/menu/tests/integration/test_dashboard.py index 876f3173..9d083eaf 100644 --- a/allianceauth/menu/tests/integration/test_dashboard.py +++ b/allianceauth/menu/tests/integration/test_dashboard.py @@ -68,35 +68,3 @@ class TestDefaultDashboardWithSideMenu(TestCase): self.assertEqual(links["/dashboard/"], "Dashboard") self.assertEqual(links["/groups/"], "Groups") self.assertNotIn("http://www.example.com/alpha", links) - - -class TestBS3DashboardWithSideMenu(TestCase): - def test_should_not_show_group_management_when_user_has_no_permission(self): - # given - user = create_user() - self.client.force_login(user) - - # when - response = self.client.get("/dashboard_bs3/") - - # then - self.assertEqual(response.status_code, HTTPStatus.OK) - links = extract_links(response) - self.assertEqual(links["/dashboard/"], "Dashboard") - self.assertEqual(links["/groups/"], "Groups") - self.assertNotIn("/groupmanagement/requests/", links) - - def test_should_show_group_management_when_user_has_permission(self): - # given - user = create_user(permissions=["auth.group_management"]) - self.client.force_login(user) - - # when - response = self.client.get("/dashboard_bs3/") - - # then - self.assertEqual(response.status_code, HTTPStatus.OK) - links = extract_links(response) - self.assertEqual(links["/dashboard/"], "Dashboard") - self.assertEqual(links["/groups/"], "Groups") - self.assertEqual(links["/groupmanagement/requests/"], "Group Management")