-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
AUTH0_ROLES_TO_REFLECT = { | ||
"Vaccinate CA Staff", | ||
"VIAL super-user", | ||
AUTH0_ROLES_STAFF = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I add all the staff roles? 🤔
The author of this PR, ugotsoul, is not an activated member of this organization on Codecov. |
Oh yeah, one thing I'll need to do is update all the reports and locations that were made by wb trainee's to be pending review (after coordinating with the wb'ing team to make sure they didn't approve these or not!) |
group.user_set.add(user) | ||
else: | ||
group.user_set.remove(user) | ||
|
||
# Note: Not all users are reporters | ||
reporter_qs = Reporter.objects.filter(user=user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use reporter = Reporter.objects.filter(user=user).first()
here and it will either return a reporter or return None
- which means you can then do if reporter:
later on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TY! I totally forgot about this.
Looks good to me - let's get this on staging and test it there. |
Testing on staging with my regular account ([email protected]) and got a bit worried I couldn't see admin pages, but I realized this was because there were no permissions assigned to these staging groups (whew!). https://vial-staging.calltheshots.us/dashboard/groups-and-permissions/ |
@simonw would you be able to add permissions for these groups:
since I'm locked out of viewing/editing group permissions on staging? Hopefully you are still logged into staging 🙏🏾 |
I got super user status and I was able to view groups again! I'm adding permissions to those groups above and also added a |
I logged out/in after assigning |
Part of #610 (comment)
I tested this locally, by adding / removing "WB Trainee" and other auth0 roles to my user.
Expected behavior:
STAGING
or local/prodVIAL WB Limited
is not displaying in the Reporters page #633How to test: