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

B 20010 int Add FF for HQ role #12984

Merged
merged 29 commits into from
Jun 12, 2024
Merged

B 20010 int Add FF for HQ role #12984

merged 29 commits into from
Jun 12, 2024

Conversation

r-mettler
Copy link
Contributor

B-20010

Summary

The changes here are to FF off the Headquarters Role in the Admin App Office Account creation page and remove the HQ role checkbox from the Office App Request Account page. Since FF can't currently be read without being signed in the Office App will get the HQ role checkbox back once we determine all HQ role options are functioning properly. For now the only way to create a HQ user role is via the Admin App Office Creation page with the FEATURE_FLAG_HEADQUARTERS_ROLE feature flag turned on.

This backlog adds a new Headquarters Office user role. Further downstream tasks will add privileges meant for the HQ role which will limit pages to read only.

Is there anything you would like reviewers to give additional scrutiny?

Turn the FEATURE_FLAG_HEADQUARTERS_ROLE on/off and test.

Verification Steps for the Author

These are to be checked by the author.

  • Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
  • Have the Agility acceptance criteria been met for this change?

Verification Steps for Reviewers

These are to be checked by a reviewer.

  • Has the branch been pulled in and checked out?
  • Have the BL acceptance criteria been met for this change?
  • Was the CircleCI build successful?
  • Has the code been reviewed from a standards and best practices point of view?

Setup to Run the Code

How to test

  1. Login to the admin application
  2. Create a new Office user
  3. Select the Safety Moves Privilege then attempt to select HQ checkbox you should NOT be able to
  4. Deselect Safety Moves Privilege then select HQ role
  5. Attempt to select Safety Moves Privilege you should NOT be able to
  6. Select the TOO role and click Save

image (2)

  1. Go to the Office app and sign in as the newly created user

  2. Click the change user role and verify you can login with the HQ role
    image (3)
    NOTE: At this point you should be able to do what a TOO can do but this story was to just allow a new login role

  3. Turn off the FEATURE_FLAG_HEADQUARTERS_ROLE by changing it to false in the .envrc file

  4. Also turn off headquarters_role in the development.features.yaml file by setting enabled and value to false for the headquarters_role key.

  5. Kill your server and client in the terminal

  6. Run direnv allow

  7. Relaunch server and client in terminal

  8. Login to the Admin app and go to create a new Office User

  9. Fill out the form then attempt to select the Headquarters role checkbox you should NOT be able to

Frontend

  • There are no aXe warnings for UI.
  • This works in Supported Browsers and their phone views (Chrome, Firefox, Edge).
  • There are no new console errors in the browser devtools.
  • There are no new console errors in the test output.
  • If this PR adds a new component to Storybook, it ensures the component is fully responsive, OR if it is intentionally not, a wrapping div using the officeApp class or custom min-width styling is used to hide any states the would not be visible to the user.
  • This change meets the standards for Section 508 compliance.

Backend

Database

Any new migrations/schema changes:

  • Follows our guidelines for Zero-Downtime Deploys.
  • Have been communicated to #g-database.
  • Secure migrations have been tested following the instructions in our docs.

Screenshots

@r-mettler r-mettler added Scrummy Bears Scrum Team H INTEGRATION Slated for Integration Testing labels Jun 6, 2024
@r-mettler r-mettler self-assigned this Jun 6, 2024
@r-mettler r-mettler requested a review from a team as a code owner June 6, 2024 23:23
@robot-mymove
Copy link

robot-mymove commented Jun 6, 2024

Warnings
⚠️

Files located in legacy directories (src/shared or src/scenes) have
been edited. Are you sure you don’t want to also relocate them to the new file structure?

View the frontend file org ADR for more information

Generated by 🚫 dangerJS against a77a607

@@ -62,10 +62,10 @@ export const RequestAccount = ({ setFlashMessage }) => {
roleType: 'qae_csr',
});
}
if (values.headquartersCheckBox) {
if (values.customerSupportRepresentativeCheckBox) {
Copy link
Contributor

@ajlusk ajlusk Jun 10, 2024

Choose a reason for hiding this comment

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

Hard to see in the default diff view but it looks like a weird merge thing caused this if block to be duplicated.
Screenshot 2024-06-10 at 2 43 47 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ha, figures. It didn't even flag it as a conflict. I'll go fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it. Only did that on this INT branch. Thanks git *sigh

Copy link
Contributor

@ajlusk ajlusk left a comment

Choose a reason for hiding this comment

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

Functions as described. Tests are passing.

Just needs that duplicate if statement removed but that shouldn't affect functionality.

@ajlusk ajlusk self-requested a review June 11, 2024 19:59
@ajlusk
Copy link
Contributor

ajlusk commented Jun 11, 2024

When I create a new HQ user from http://officelocal:3000/devlocal-auth/login with the FF enabled it only has the TOO role.

Copy link
Contributor

@ajlusk ajlusk left a comment

Choose a reason for hiding this comment

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

Never mind, with the comment above. No need to hold up this any longer. I'm adding a fix for it in my PR, it could reasonably be part of either.

Copy link
Contributor

@MInthavongsay MInthavongsay left a comment

Choose a reason for hiding this comment

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

Looks good. Just one minor CONSTANTS usage comment.

@r-mettler r-mettler merged commit d409718 into integrationTesting Jun 12, 2024
30 checks passed
@r-mettler r-mettler deleted the B-20010-INT branch June 12, 2024 22:27
@ajlusk ajlusk mentioned this pull request Jun 26, 2024
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INTEGRATION Slated for Integration Testing Scrummy Bears Scrum Team H
Development

Successfully merging this pull request may close these issues.

4 participants