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

updated load_current_user in api to check user group in list #111

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

critch646
Copy link
Collaborator

Problem

  • The API was not authenticating sanctuary users because load_current_user was only checking if the user group was medical

Solution

  • Updated the load_current_user() function to check if the user group is in the list of allowed groups

Ticket
N/A

Tests

  • docker compose up testapi
  • manually logged in as a sanctuary user and checked frontend behaviour

Problem
- The API was not authenticating sanctuary users because
 load_current_user was only checking if the user group was medical

Solution
- Updated the load_current_user() function to check if the user group is in the list of allowed groups

Ticket
N/A

Tests
- docker compose up testapi
- manually logged in as a sanctuary user and checked frontend behaviour
Copy link
Collaborator

@MadelaineJ MadelaineJ left a comment

Choose a reason for hiding this comment

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

almost done! (famous last words...)

@critch646 critch646 merged commit 5521079 into main Feb 27, 2024
1 check passed
@critch646 critch646 deleted the zeke/dev/sanctuary-login-fix branch February 27, 2024 17:01
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.

2 participants