diff --git a/ansible_ai_connect/main/templates/base.html b/ansible_ai_connect/main/templates/base.html index bd48eee9e..09b01798b 100644 --- a/ansible_ai_connect/main/templates/base.html +++ b/ansible_ai_connect/main/templates/base.html @@ -11,15 +11,6 @@
{% block banner %} - {% if use_tech_preview %} -NOTE: Due to overwhelming positive demand, we have extended the availability of the {{ project_name }} Technical Preview from December 31, 2023 to March 11, 2024.
-- You do not have a licensed seat for {{ project_name }}. You will be limited to features of the {{ project_name }} tech preview until you are assigned a named seat. - Contact your Red Hat account organization administrator for more information on how to assign a named seat. -
-You do not have an Active subscription to Ansible Automation Platform which is required to use {{ project_name }}. -{% elif user.is_authenticated and not use_tech_preview and user.rh_org_has_subscription and not user.rh_user_has_seat %} +{% elif user.is_authenticated and user.rh_org_has_subscription and not user.rh_user_has_seat %} diff --git a/ansible_ai_connect/users/tests/test_views.py b/ansible_ai_connect/users/tests/test_views.py index afcf7098b..f7bd6c83d 100644 --- a/ansible_ai_connect/users/tests/test_views.py +++ b/ansible_ai_connect/users/tests/test_views.py @@ -53,11 +53,6 @@ def test_unauthorized(self): self.assertNotContains(response, "Role:") self.assertNotContains(response, "Admin Portal") - @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True) - def test_unauthorized_with_tech_preview(self): - response = self.client.get(reverse("login")) - self.assertContains(response, "Log in to Tech Preview") - @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=False) def test_unauthorized_without_tech_preview(self): response = self.client.get(reverse("login")) @@ -88,22 +83,6 @@ def test_rh_admin_with_seat_and_no_secret(self): self.assertContains(response, "model settings have not been configured", count=1) self.assertContains(response, "Admin Portal", count=1) - @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True) - @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") - @patch.object(ansible_ai_connect.users.models.User, "rh_org_has_subscription", False) - @patch.object(ansible_ai_connect.users.models.User, "rh_user_has_seat", False) - def test_rh_admin_without_seat_and_with_no_secret_with_tech_preview(self): - response = self.client.get(reverse("home")) - self.assertEqual(response.status_code, 200) - self.assertContains(response, "pf-c-alert__title", count=1) - self.assertNotContains(response, "Your organization doesn't have access to Project Name.") - self.assertNotContains(response, "You will be limited to features of the Project Name") - self.assertNotContains( - response, "The Project Name Technical Preview is no longer available" - ) - self.assertContains(response, "Role: administrator") - self.assertContains(response, "Admin Portal") - @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=False) @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @patch.object(ansible_ai_connect.users.models.User, "rh_org_has_subscription", False) @@ -145,42 +124,6 @@ def tearDown(self): self.user.delete() super().tearDown() - @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True) - @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") - @override_settings(WCA_SECRET_DUMMY_SECRETS="") - @patch.object(ansible_ai_connect.users.models.User, "rh_org_has_subscription", True) - @patch.object(ansible_ai_connect.users.models.User, "rh_user_has_seat", False) - def test_rh_user_without_seat_and_no_secret_with_tech_preview(self): - response = self.client.get(reverse("home")) - self.assertEqual(response.status_code, 200) - self.assertNotContains(response, "Role:") - self.assertContains(response, "pf-c-alert__title", count=2) - self.assertContains(response, "You do not have a licensed seat for Project Name") - self.assertContains(response, "You will be limited to features of the Project Name") - self.assertNotContains(response, "fas fa-exclamation-circle") - self.assertNotContains(response, "Admin Portal") - self.assertNotContains( - response, "The Project Name Technical Preview is no longer available" - ) - - @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True) - @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") - @override_settings(WCA_SECRET_DUMMY_SECRETS="valid") - @patch.object(ansible_ai_connect.users.models.User, "rh_org_has_subscription", True) - @patch.object(ansible_ai_connect.users.models.User, "rh_user_has_seat", False) - def test_rh_user_without_seat_with_secret_with_tech_preview(self): - response = self.client.get(reverse("home")) - self.assertEqual(response.status_code, 200) - self.assertNotContains(response, "Role:") - self.assertContains(response, "pf-c-alert__title", count=2) - self.assertContains(response, "You do not have a licensed seat for Project Name") - self.assertContains(response, "You will be limited to features of the Project Name") - self.assertNotContains(response, "fas fa-exclamation-circle") - self.assertNotContains(response, "Admin Portal") - self.assertNotContains( - response, "The Project Name Technical Preview is no longer available" - ) - @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=False) @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @override_settings(WCA_SECRET_DUMMY_SECRETS="") @@ -215,18 +158,6 @@ def test_rh_user_with_a_seat_and_with_secret(self): self.assertContains(response, "Project Name") self.assertNotContains(response, "Admin Portal") - @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True) - @override_settings(WCA_SECRET_DUMMY_SECRETS="1234567:valid") - @patch.object(ansible_ai_connect.users.models.User, "rh_org_has_subscription", True) - @patch.object(ansible_ai_connect.users.models.User, "rh_user_has_seat", False) - def test_rh_user_with_no_seat_and_with_secret(self): - response = self.client.get(reverse("home")) - self.assertEqual(response.status_code, 200) - self.assertNotContains(response, "Role: licensed user") - self.assertNotContains(response, "more information on how to get a licensed seat.") - self.assertContains(response, "pf-c-alert__title", count=2) - self.assertNotContains(response, "Admin Portal") - @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=False) @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @patch.object(ansible_ai_connect.users.models.User, "rh_org_has_subscription", False)