Skip to content

Commit

Permalink
Set User Roles test endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinon committed Jul 21, 2022
1 parent 7339cfb commit 254cdd4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/common/controllers/firebase/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
#################################
# Basic Authentication Router
#################################

@router.get("/set-admin") # Sets current user as admin
def set_user_admin(user: User = Depends(get_user())):
auth.set_custom_user_claims(user.uid, {"roles": ["admin"]})

0 comments on commit 254cdd4

Please sign in to comment.