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

Ops 441 cannot lock yourself #2678

Merged
merged 5 commits into from
Aug 15, 2024
Merged

Ops 441 cannot lock yourself #2678

merged 5 commits into from
Aug 15, 2024

Conversation

johndeange
Copy link
Contributor

@johndeange johndeange commented Aug 14, 2024

What changed

Do not allow the USER_ADMIN to deactivate themselves.

Issue

#441

How to test

  1. Log in as the Budget Team user.
  2. Navigate to the User Admin page.
  3. Select the Budget Team user.
  4. In the card for the user, attempt to select a status of INACTIVE or LOCKED
  5. An error alert should appear.

Definition of Done Checklist

  • OESA: Code refactored for clarity
  • OESA: Dependency rules followed
  • Automated unit tests updated and passed
  • Automated integration tests updated and passed
  • Automated quality tests updated and passed
  • Automated load tests updated and passed
  • Automated a11y tests updated and passed
  • Automated security tests updated and passed
  • 90%+ Code coverage achieved
  • Form validations updated

@johndeange johndeange marked this pull request as ready for review August 14, 2024 17:51

if data.get("status") in [UserStatus.INACTIVE, UserStatus.LOCKED]:
if user_id == request_user.id:
Copy link
Contributor

Choose a reason for hiding this comment

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

there it is!

Copy link
Contributor

@fpigeonjr fpigeonjr left a comment

Choose a reason for hiding this comment

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

🏆tested locally and manual tests pass
image

@johndeange johndeange merged commit 9c5e78d into main Aug 15, 2024
40 checks passed
@johndeange johndeange deleted the OPS-441-cannot-lock-yourself branch August 15, 2024 13:45
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.

3 participants