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

upcoming: [M3-7462] - User Permissions: Configure Billing Account Access #10069

Merged
merged 7 commits into from
Jan 18, 2024

Conversation

jaalah-akamai
Copy link
Contributor

@jaalah-akamai jaalah-akamai commented Jan 17, 2024

Description 📝

Depending on the type of user managing the account, we want to restrict account access to billing.

  • Regular/Parent Account Users: No change, they can configure None | Read Only | Read Write.
  • Child Account Users: Can configure None | Read Only, Read Write is disabled.
  • Proxy Users: Read Write is enabled and immutable, None | Read Only are disabled.

Changes 🔄

  • currentUser and username created ambiguity as to what user we're actually dealing with for permissions, so to provide clarity:
    • currentUser is now accountUsername
    • username is now currentUsername
  • Removed checkAndEnableChildAccountAccess and it's accompanying state properties since we can infer all this based on user_type.
    • Removed from state: childAccountAccessEnabled and isAccountAccessRestricted
  • Added userType to state
  • Updated E2E tests to account for Proxy user Billing Access perms

Preview 📷

Include a screenshot or screen recording of the change

User Type Screenshot
Normal / Parent Screenshot 2024-01-17 at 11 58 58 AM
Child Screenshot 2024-01-17 at 11 58 00 AM
Proxy Screenshot 2024-01-17 at 11 58 32 AM

How to test 🧪

Prerequisites

(How to setup test environment)

  • Enable Parent / Child Account feature flag
  • Turn on Mock Service Worker (MSW)
  • Ensure that { user_type: 'parent' } in serverHandlers.ts

Reproduction steps

(How to reproduce the issue, if applicable)

Verification steps

(How to verify changes)

  • Ensure as a Parent/NonAdminUser you can enable any billing account access perms
  • Ensure as a Child user that Read Write is disabled, but other two perms are selectable.
  • Ensure as a Proxy user that Read Write is enabled, but other two perms are disabled.

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@jaalah-akamai jaalah-akamai self-assigned this Jan 17, 2024
@jaalah-akamai jaalah-akamai changed the title upcoming: [M3-7462] - User Permissions: Billing Account Access upcoming: [M3-7462] - User Permissions: Configure Billing Account Access Jan 17, 2024
@jaalah-akamai jaalah-akamai marked this pull request as ready for review January 17, 2024 21:57
@jaalah-akamai jaalah-akamai requested review from a team as code owners January 17, 2024 21:57
@jaalah-akamai jaalah-akamai requested review from jdamore-linode, hana-akamai and cpathipa and removed request for a team January 17, 2024 21:57
@mjac0bs mjac0bs self-requested a review January 17, 2024 22:43
Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

✅ Saw the described permissions enabled/disabled for the user types.

I think that renaming helps clear things up a lot.

Thanks for the changes; don't forget to remove only from the new integration test. I ran the full spec locally and all passed:

image

@mjac0bs mjac0bs added the Add'tl Approval Needed Waiting on another approval! label Jan 17, 2024
jaalah-akamai and others added 2 commits January 18, 2024 10:13
Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
…c.ts

Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
Copy link
Contributor

@jdamore-linode jdamore-linode left a comment

Choose a reason for hiding this comment

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

Nice work @jaalah-akamai! Approved pending re-enabling the other user-permissions.spec tests and addressing Mariah's other feedback

jaalah-akamai and others added 2 commits January 18, 2024 10:15
…c.ts

Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
@jaalah-akamai jaalah-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Jan 18, 2024
Copy link

github-actions bot commented Jan 18, 2024

Coverage Report:
Base Coverage: 79.83%
Current Coverage: 79.85%

@jaalah-akamai jaalah-akamai merged commit e475c6b into linode:develop Jan 18, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Parent / Child Account
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants