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

Fix: Regional Admin is Logged Out When Viewing an Organization #269

Conversation

Matthew-Grayson
Copy link
Contributor

@Matthew-Grayson Matthew-Grayson commented May 20, 2024

🗣 Description

  • Add regionalAdmin to RouteGuard for /organizations/:organizationId
  • Add checks to associated endpoint to verify a user is a regionalAdmin and that a selected organization belongs to their region
  • Add missing awaits to save() methods in organizations.ts
  • Simplify if statements in auth.ts

💭 Motivation and context

Fix issue #268

🧪 Testing

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

@Matthew-Grayson Matthew-Grayson linked an issue May 20, 2024 that may be closed by this pull request
@Matthew-Grayson Matthew-Grayson marked this pull request as ready for review May 20, 2024 21:05
Copy link
Collaborator

@cduhn17 cduhn17 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@schmelz21 schmelz21 left a comment

Choose a reason for hiding this comment

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

LGTM

@schmelz21 schmelz21 merged commit 7480e72 into develop May 21, 2024
22 of 23 checks passed
@schmelz21 schmelz21 deleted the 268-regional-admin-is-logged-out-when-viewing-an-organization branch May 21, 2024 15:47
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.

Regional Admin is Logged Out When Viewing an Organization
4 participants