From a8b26e3de33c8b73a1b40a97cdb5fa6dfe2ec39d Mon Sep 17 00:00:00 2001 From: CocoByte Date: Tue, 24 Sep 2024 18:27:30 -0600 Subject: [PATCH] Delete Admin read-only (comment out, just in case) --- .../models/user_portfolio_permission.py | 16 ++++++++-------- src/registrar/models/utility/portfolio_helper.py | 2 +- src/registrar/tests/test_reports.py | 6 +++--- src/registrar/tests/test_views_domain.py | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/registrar/models/user_portfolio_permission.py b/src/registrar/models/user_portfolio_permission.py index f7bafc8c6..6b358cc1b 100644 --- a/src/registrar/models/user_portfolio_permission.py +++ b/src/registrar/models/user_portfolio_permission.py @@ -25,14 +25,14 @@ class UserPortfolioPermission(TimeStampedModel): UserPortfolioPermissionChoices.VIEW_SUBORGANIZATION, UserPortfolioPermissionChoices.EDIT_SUBORGANIZATION, ], - UserPortfolioRoleChoices.ORGANIZATION_ADMIN_READ_ONLY: [ - UserPortfolioPermissionChoices.VIEW_ALL_DOMAINS, - UserPortfolioPermissionChoices.VIEW_MEMBERS, - UserPortfolioPermissionChoices.VIEW_ALL_REQUESTS, - UserPortfolioPermissionChoices.VIEW_PORTFOLIO, - # Domain: field specific permissions - UserPortfolioPermissionChoices.VIEW_SUBORGANIZATION, - ], + # UserPortfolioRoleChoices.ORGANIZATION_ADMIN_READ_ONLY: [ + # UserPortfolioPermissionChoices.VIEW_ALL_DOMAINS, + # UserPortfolioPermissionChoices.VIEW_MEMBERS, + # UserPortfolioPermissionChoices.VIEW_ALL_REQUESTS, + # UserPortfolioPermissionChoices.VIEW_PORTFOLIO, + # # Domain: field specific permissions + # UserPortfolioPermissionChoices.VIEW_SUBORGANIZATION, + # ], UserPortfolioRoleChoices.ORGANIZATION_MEMBER: [ UserPortfolioPermissionChoices.VIEW_PORTFOLIO, ], diff --git a/src/registrar/models/utility/portfolio_helper.py b/src/registrar/models/utility/portfolio_helper.py index 7f34221fd..51f227089 100644 --- a/src/registrar/models/utility/portfolio_helper.py +++ b/src/registrar/models/utility/portfolio_helper.py @@ -7,7 +7,7 @@ class UserPortfolioRoleChoices(models.TextChoices): """ ORGANIZATION_ADMIN = "organization_admin", "Admin" - ORGANIZATION_ADMIN_READ_ONLY = "organization_admin_read_only", "Admin read only" + # ORGANIZATION_ADMIN_READ_ONLY = "organization_admin_read_only", "Admin read only" ORGANIZATION_MEMBER = "organization_member", "Member" diff --git a/src/registrar/tests/test_reports.py b/src/registrar/tests/test_reports.py index ed2b75791..d4c0f2ab5 100644 --- a/src/registrar/tests/test_reports.py +++ b/src/registrar/tests/test_reports.py @@ -357,9 +357,9 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib): self.assertNotIn(self.domain_2.name, csv_content) # Test the output for readonly admin - portfolio_permission.roles = [UserPortfolioRoleChoices.ORGANIZATION_ADMIN_READ_ONLY] - portfolio_permission.save() - portfolio_permission.refresh_from_db() + # portfolio_permission.roles = [UserPortfolioRoleChoices.ORGANIZATION_ADMIN_READ_ONLY] + # portfolio_permission.save() + # portfolio_permission.refresh_from_db() # Get the csv content csv_content = self._run_domain_data_type_user_export(request) diff --git a/src/registrar/tests/test_views_domain.py b/src/registrar/tests/test_views_domain.py index 8fb92df72..f0776d10c 100644 --- a/src/registrar/tests/test_views_domain.py +++ b/src/registrar/tests/test_views_domain.py @@ -1567,9 +1567,9 @@ class TestDomainSuborganization(TestDomainOverview): self.domain_information.refresh_from_db() # Add portfolio perms to the user object - portfolio_permission, _ = UserPortfolioPermission.objects.get_or_create( - user=self.user, portfolio=portfolio, roles=[UserPortfolioRoleChoices.ORGANIZATION_ADMIN_READ_ONLY] - ) + # portfolio_permission, _ = UserPortfolioPermission.objects.get_or_create( + # user=self.user, portfolio=portfolio, roles=[UserPortfolioRoleChoices.ORGANIZATION_ADMIN_READ_ONLY] + # ) self.assertEqual(self.domain_information.sub_organization, suborg)