Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(on getgov-bob) Ticket #1948: Remove draft domain and websites for analysts #1981

Merged
merged 14 commits into from
Apr 12, 2024

Conversation

zandercymatics
Copy link
Contributor

@zandercymatics zandercymatics commented Apr 3, 2024

Ticket

Resolves #1948

Changes

  • Adds overrides for get_model_perms, has_change_permission, and response_change for WebsiteAdmin and DraftDomain
  • Adds migration
  • Modifies user_group to exclude draftdomain and website
  • Adds tests

Context for reviewers

This PR makes DraftDomain and Websites inaccessible to analysts, EXCEPT for when they click the viewonly links on DomainRequest (so they can still modify it through that avenue).

Setup

  • Login as an analyst
  • Go to Admin. You should not see DraftDomain or Websites as an option
  • Go to DomainRequest
  • You should still see Requested Domain and Alternative Domain
  • Click on Requested Domain and Alternative Domain. You should be redirected to the edit pages of these without being denied access.

Code Review Verification Steps

As the original developer, I have

Satisfied acceptance criteria and met development standards

  • Met the acceptance criteria, or will meet them in a subsequent PR
  • Created/modified automated tests
  • Added at least 2 developers as PR reviewers (only 1 will need to approve)
  • Messaged on Slack or in standup to notify the team that a PR is ready for review
  • Changes to “how we do things” are documented in READMEs and or onboarding guide
  • If any model was updated to modify/add/delete columns, makemigrations was ran and the associated migrations file has been commited.

Ensured code standards are met (Original Developer)

  • All new functions and methods are commented using plain language
  • Did dependency updates in Pipfile also get changed in requirements.txt?
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values

Validated user-facing changes (if applicable)

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • Add at least 1 designer as PR reviewer

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

  • Pulled this branch locally and tested it
  • Reviewed this code and left comments
  • Checked that all code is adequately covered by tests
  • Made it clear which comments need to be addressed before this work is merged
  • If any model was updated to modify/add/delete columns, makemigrations was ran and the associated migrations file has been commited.

Ensured code standards are met (Code reviewer)

  • All new functions and methods are commented using plain language
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values
  • (Rarely needed) Did dependency updates in Pipfile also get changed in requirements.txt?

Validated user-facing changes as a developer

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing

  • Checked keyboard navigability

  • Meets all designs and user flows provided by design/product

  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

  • Tested with multiple browsers, the suggestion is to use ones that the developer didn't (check off which ones were used)

    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

Note: Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist

As a designer reviewer, I have

Verified that the changes match the design intention

  • Checked that the design translated visually
  • Checked behavior
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links
  • Tried to break the intended flow

Validated user-facing changes as a designer

  • Checked keyboard navigability

  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

  • Tested with multiple browsers (check off which ones were used)

    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

Screenshots

src/registrar/admin.py Outdated Show resolved Hide resolved
@zandercymatics zandercymatics changed the title (Draft) Ticket #1948: Remove draft domain and websites for analysts Ticket #1948: Remove draft domain and websites for analysts Apr 3, 2024
Copy link

github-actions bot commented Apr 9, 2024

🥳 Successfully deployed to developer sandbox za.

Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link

🥳 Successfully deployed to developer sandbox za.

@zandercymatics zandercymatics changed the title Ticket #1948: Remove draft domain and websites for analysts (on getgov-bob) Ticket #1948: Remove draft domain and websites for analysts Apr 10, 2024
@zandercymatics zandercymatics requested review from Katherine-Osos and a team April 10, 2024 15:33
@Katherine-Osos Katherine-Osos removed the request for review from a team April 10, 2024 19:27
@abroddrick abroddrick self-assigned this Apr 11, 2024
Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link

🥳 Successfully deployed to developer sandbox za.

@Katherine-Osos
Copy link
Contributor

Katherine-Osos commented Apr 11, 2024

For visibility: Met with Zander to provide feedback on what happens when you edit/save a requested domain or alternative domain (now that the corresponding tables are no longer in the navigation). Once that is updated, will approve.

Copy link
Contributor

@abroddrick abroddrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!

@@ -0,0 +1,37 @@
# This migration creates the create_full_access_group and create_cisa_analyst_group groups
# It is dependent on 0079 (which populates federal agencies)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non blocking comment: is this right? It seems like it's really dependent on 0083

Copy link
Contributor Author

@zandercymatics zandercymatics Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find!! That is a typo

Copy link

🥳 Successfully deployed to developer sandbox za.

Copy link
Contributor

@Katherine-Osos Katherine-Osos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@zandercymatics zandercymatics merged commit 21638ad into main Apr 12, 2024
18 of 20 checks passed
@zandercymatics zandercymatics deleted the za/1948-remove-draft-domain-and-websites branch April 12, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Django admin: Remove "draft domains" & "websites" sections from the navigation for analysts
3 participants