From 8c4e43d17e2625ec706375006a70f7980fbeaf62 Mon Sep 17 00:00:00 2001 From: Alysia Broddrick Date: Mon, 25 Mar 2024 16:44:58 -0700 Subject: [PATCH 1/9] updated to include redirect language --- docs/operations/runbooks/downtime_incident_management.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/operations/runbooks/downtime_incident_management.md b/docs/operations/runbooks/downtime_incident_management.md index 1e0870efa..5e7aabb87 100644 --- a/docs/operations/runbooks/downtime_incident_management.md +++ b/docs/operations/runbooks/downtime_incident_management.md @@ -16,12 +16,14 @@ The following set of rules should be followed while an incident is in progress. - If downtime occurs outside of working hours, team members who are off for the day may still be pinged and called but are not required to join if unavailable to do so. - Uncomment the [banner on get.gov](https://github.com/cisagov/get.gov/blob/0365d3d34b041cc9353497b2b5f81b6ab7fe75a9/_includes/header.html#L9), so it is transparent to users that we know about the issue on manage.get.gov. - Designers or Developers should be able to make this change; if designers are online and can help with this task, that will allow developers to focus on fixing the bug. +- If the issue persists for three hours or more, follow the [instructions for enabling/disabling a redirect to get.gov](https://docs.google.com/document/d/1PiWXpjBzbiKsSYqEo9Rkl72HMytMp7zTte9CI-vvwYw/edit) ## Post Incident The following checklist should be followed after the site is back up and running. - [ ] Message in #dotgov-announce with an @here saying the issue is resolved +- [ ] If the redirect was used, refer to the [instructions for enabling/disabling a redirect to get.gov](https://docs.google.com/document/d/1PiWXpjBzbiKsSYqEo9Rkl72HMytMp7zTte9CI-vvwYw/edit) to turn off this redirect. Double-check in the browser that this redirect is no longer occurring (the change may take a few minutes to take full effect) - [ ] Remove the [banner on get.gov](https://github.com/cisagov/get.gov/blob/0365d3d34b041cc9353497b2b5f81b6ab7fe75a9/_includes/header.html#L9) by commenting it out. - [ ] Write up what happened and when; if the cause is already known, write that as well. This is a draft for internal communications and not for any public facing site and can be as simple as using bullet points. - [ ] If the cause is not known yet, developers should investigate the issue as the highest priority task. From aca65985b6c4a0988654d4a9c9b34565260ed3fd Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 27 Mar 2024 15:09:53 -0400 Subject: [PATCH 2/9] Collapse some content on DR and DI --- src/registrar/admin.py | 32 ++++++++++++++++++++ src/registrar/assets/sass/_theme/_admin.scss | 14 +++++++++ 2 files changed, 46 insertions(+) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 605c4fe1e..df87b5e00 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -885,6 +885,14 @@ class DomainInformationAdmin(ListHeaderAdmin): "fields": [ "generic_org_type", "is_election_board", + ] + }, + ), + ( + "More details", + { + "classes": ["collapse"], + "fields": [ "federal_type", "federal_agency", "tribe_name", @@ -900,6 +908,14 @@ class DomainInformationAdmin(ListHeaderAdmin): "fields": [ "organization_name", "state_territory", + ] + }, + ), + ( + "More details", + { + "classes": ["collapse"], + "fields": [ "address_line1", "address_line2", "city", @@ -1092,6 +1108,14 @@ class DomainRequestAdmin(ListHeaderAdmin): "fields": [ "generic_org_type", "is_election_board", + ] + }, + ), + ( + "More details", + { + "classes": ["collapse"], + "fields": [ "federal_type", "federal_agency", "tribe_name", @@ -1107,6 +1131,14 @@ class DomainRequestAdmin(ListHeaderAdmin): "fields": [ "organization_name", "state_territory", + ] + }, + ), + ( + "More details", + { + "classes": ["collapse"], + "fields": [ "address_line1", "address_line2", "city", diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index b7a494aef..104eafc32 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -349,4 +349,18 @@ input.admin-confirm-button { .errors span.select2-selection { border: 1px solid var(--error-fg) !important; +} + +.module.collapse { + margin-top: -35px; + padding-top: 0; + border: none; + h2 { + background: none; + color: var(--body-fg)!important; + text-transform: none; + } + a { + color: var(--link-fg); + } } \ No newline at end of file From 889bf864e8f79e70c4710f49537cc1e0c33f5b1c Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 27 Mar 2024 15:23:11 -0400 Subject: [PATCH 3/9] Lint --- src/registrar/admin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index df87b5e00..73c2cccf9 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -899,7 +899,7 @@ class DomainInformationAdmin(ListHeaderAdmin): "federally_recognized_tribe", "state_recognized_tribe", "about_your_organization", - ] + ], }, ), ( @@ -921,7 +921,7 @@ class DomainInformationAdmin(ListHeaderAdmin): "city", "zipcode", "urbanization", - ] + ], }, ), ] @@ -1122,7 +1122,7 @@ class DomainRequestAdmin(ListHeaderAdmin): "federally_recognized_tribe", "state_recognized_tribe", "about_your_organization", - ] + ], }, ), ( @@ -1144,7 +1144,7 @@ class DomainRequestAdmin(ListHeaderAdmin): "city", "zipcode", "urbanization", - ] + ], }, ), ] From 65e899976c0cc1fa16ba75132f73c45afa12db96 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Wed, 27 Mar 2024 16:44:03 -0400 Subject: [PATCH 4/9] end line --- src/registrar/assets/sass/_theme/_admin.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index 104eafc32..70fa3811f 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -363,4 +363,4 @@ input.admin-confirm-button { a { color: var(--link-fg); } -} \ No newline at end of file +} From ccadb88239c4234dd32f6a3b89c835cc57677659 Mon Sep 17 00:00:00 2001 From: Alysia Broddrick <109625347+abroddrick@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:02:58 -0700 Subject: [PATCH 5/9] Update docs/operations/runbooks/downtime_incident_management.md Co-authored-by: zandercymatics <141044360+zandercymatics@users.noreply.github.com> --- docs/operations/runbooks/downtime_incident_management.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/operations/runbooks/downtime_incident_management.md b/docs/operations/runbooks/downtime_incident_management.md index 5e7aabb87..ada9c9d5d 100644 --- a/docs/operations/runbooks/downtime_incident_management.md +++ b/docs/operations/runbooks/downtime_incident_management.md @@ -16,7 +16,7 @@ The following set of rules should be followed while an incident is in progress. - If downtime occurs outside of working hours, team members who are off for the day may still be pinged and called but are not required to join if unavailable to do so. - Uncomment the [banner on get.gov](https://github.com/cisagov/get.gov/blob/0365d3d34b041cc9353497b2b5f81b6ab7fe75a9/_includes/header.html#L9), so it is transparent to users that we know about the issue on manage.get.gov. - Designers or Developers should be able to make this change; if designers are online and can help with this task, that will allow developers to focus on fixing the bug. -- If the issue persists for three hours or more, follow the [instructions for enabling/disabling a redirect to get.gov](https://docs.google.com/document/d/1PiWXpjBzbiKsSYqEo9Rkl72HMytMp7zTte9CI-vvwYw/edit) +- If the issue persists for three hours or more, follow the [instructions for enabling/disabling a redirect to get.gov](https://docs.google.com/document/d/1PiWXpjBzbiKsSYqEo9Rkl72HMytMp7zTte9CI-vvwYw/edit). ## Post Incident From 7bb31fde9c873caf22f05131b45a1252820a71a0 Mon Sep 17 00:00:00 2001 From: Alysia Broddrick <109625347+abroddrick@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:03:29 -0700 Subject: [PATCH 6/9] Update docs/operations/runbooks/downtime_incident_management.md Co-authored-by: zandercymatics <141044360+zandercymatics@users.noreply.github.com> --- docs/operations/runbooks/downtime_incident_management.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/operations/runbooks/downtime_incident_management.md b/docs/operations/runbooks/downtime_incident_management.md index ada9c9d5d..4aa884e9d 100644 --- a/docs/operations/runbooks/downtime_incident_management.md +++ b/docs/operations/runbooks/downtime_incident_management.md @@ -22,8 +22,8 @@ The following set of rules should be followed while an incident is in progress. The following checklist should be followed after the site is back up and running. -- [ ] Message in #dotgov-announce with an @here saying the issue is resolved -- [ ] If the redirect was used, refer to the [instructions for enabling/disabling a redirect to get.gov](https://docs.google.com/document/d/1PiWXpjBzbiKsSYqEo9Rkl72HMytMp7zTte9CI-vvwYw/edit) to turn off this redirect. Double-check in the browser that this redirect is no longer occurring (the change may take a few minutes to take full effect) +- [ ] Message in #dotgov-announce with an @here saying the issue is resolved. +- [ ] If the redirect was used, refer to the [instructions for enabling/disabling a redirect to get.gov](https://docs.google.com/document/d/1PiWXpjBzbiKsSYqEo9Rkl72HMytMp7zTte9CI-vvwYw/edit) to turn off this redirect. Double-check in the browser that this redirect is no longer occurring (the change may take a few minutes to take full effect). - [ ] Remove the [banner on get.gov](https://github.com/cisagov/get.gov/blob/0365d3d34b041cc9353497b2b5f81b6ab7fe75a9/_includes/header.html#L9) by commenting it out. - [ ] Write up what happened and when; if the cause is already known, write that as well. This is a draft for internal communications and not for any public facing site and can be as simple as using bullet points. - [ ] If the cause is not known yet, developers should investigate the issue as the highest priority task. From e24760381f9d4bb9fae3753e29f438275fe7e1b1 Mon Sep 17 00:00:00 2001 From: Alysia Broddrick Date: Thu, 28 Mar 2024 16:00:46 -0700 Subject: [PATCH 7/9] added riley to fixtures --- src/registrar/fixtures_users.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/registrar/fixtures_users.py b/src/registrar/fixtures_users.py index bbe4d0b62..99fe4910e 100644 --- a/src/registrar/fixtures_users.py +++ b/src/registrar/fixtures_users.py @@ -93,6 +93,12 @@ class UserFixture: "last_name": "Chin", "email": "szu.chin@associates.cisa.dhs.gov", }, + { + "username": "012f844d-8a0f-4225-9d82-cbf87bff1d3e", + "first_name": "Riley", + "last_name": "Orr", + "email": "riley+320@truss.works", + }, ] STAFF = [ @@ -169,6 +175,12 @@ class UserFixture: "last_name": "Mcelya-Analyst", "email": "ALEXANDER.MCELYA@cisa.dhs.gov", }, + { + "username": "082a066f-e0a4-45f6-8672-4343a1208a36", + "first_name": "Riley-Analyst", + "last_name": "Orr-Analyst", + "email": "riley+321@truss.works", + }, ] def load_users(cls, users, group_name): From 81f6f8bf79b3dcf2f8bb24e121856b65204ad560 Mon Sep 17 00:00:00 2001 From: Rebecca Hsieh Date: Fri, 29 Mar 2024 09:26:27 -0700 Subject: [PATCH 8/9] Remove request number --- src/registrar/templates/domain_request_status.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/registrar/templates/domain_request_status.html b/src/registrar/templates/domain_request_status.html index e6ca4cdb3..5b6ee8368 100644 --- a/src/registrar/templates/domain_request_status.html +++ b/src/registrar/templates/domain_request_status.html @@ -41,8 +41,7 @@
-

Last updated: {{DomainRequest.updated_at|date:"F j, Y"}}
- Request #: {{DomainRequest.id}}

+

Last updated: {{DomainRequest.updated_at|date:"F j, Y"}}

{% include "includes/domain_request.html" %}

Withdraw request From e59c3613ac998b98eac469e8b1953dda48d4f7bf Mon Sep 17 00:00:00 2001 From: Erin <121973038+erinysong@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:01:45 -0700 Subject: [PATCH 9/9] Add analyst or superuser check for deleting user role --- src/registrar/views/utility/mixins.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/registrar/views/utility/mixins.py b/src/registrar/views/utility/mixins.py index aa0c9cd6b..c7083ce48 100644 --- a/src/registrar/views/utility/mixins.py +++ b/src/registrar/views/utility/mixins.py @@ -307,7 +307,12 @@ class UserDeleteDomainRolePermission(PermissionsLoginMixin): domain=domain_pk, domain__permissions__user=self.request.user, ).exists() - if not has_delete_permission: + + user_is_analyst_or_superuser = self.request.user.has_perm( + "registrar.analyst_access_permission" + ) or self.request.user.has_perm("registrar.full_access_permission") + + if not (has_delete_permission or user_is_analyst_or_superuser): return False # Check if more than one manager exists on the domain.