Started (incomplete) implementation of stream verification scheduler and endpoints
All checks were successful
AWS Deploy on Push / build (push) Successful in 5m18s
All checks were successful
AWS Deploy on Push / build (push) Successful in 5m18s
This commit is contained in:
@@ -32,7 +32,9 @@ def require_roles(*required_roles: str) -> Callable:
|
||||
|
||||
def decorator(endpoint: Callable) -> Callable:
|
||||
@wraps(endpoint)
|
||||
def wrapper(*args, user: CognitoUser = Depends(get_current_user), **kwargs):
|
||||
async def wrapper(
|
||||
*args, user: CognitoUser = Depends(get_current_user), **kwargs
|
||||
):
|
||||
user_roles = set(user.roles or [])
|
||||
needed_roles = set(required_roles)
|
||||
if not needed_roles.issubset(user_roles):
|
||||
|
||||
Reference in New Issue
Block a user