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:
@@ -26,7 +26,7 @@ def mock_get_user_from_token(token: str) -> CognitoUser:
|
||||
|
||||
# Mock endpoint for testing the require_roles decorator
|
||||
@require_roles("admin")
|
||||
async def mock_protected_endpoint(user: CognitoUser = Depends(get_current_user)):
|
||||
def mock_protected_endpoint(user: CognitoUser = Depends(get_current_user)):
|
||||
return {"message": "Success", "user": user.username}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ async def test_require_roles_no_roles():
|
||||
async def test_require_roles_multiple_roles():
|
||||
# Test requiring multiple roles
|
||||
@require_roles("admin", "super_user")
|
||||
async def mock_multi_role_endpoint(user: CognitoUser = Depends(get_current_user)):
|
||||
def mock_multi_role_endpoint(user: CognitoUser = Depends(get_current_user)):
|
||||
return {"message": "Success"}
|
||||
|
||||
# User with all required roles
|
||||
|
||||
Reference in New Issue
Block a user