We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f69f048 commit 945a702Copy full SHA for 945a702
fractal_server/app/routes/auth/__init__.py
@@ -59,13 +59,21 @@ def get_jwt_cookie_strategy() -> JWTStrategy:
59
superuser=True,
60
)
61
62
+current_user = fastapi_users.current_user()
63
+
64
65
async def current_user_act_ver_prof(
- user: UserOAuth = Depends(current_user_act_ver),
66
+ user: UserOAuth = Depends(current_user),
67
) -> UserOAuth:
- if user.profile_id is None:
68
+ if any(
69
+ (
70
+ not user.is_active,
71
+ not user.is_verified,
72
+ user.profile_id is None,
73
+ )
74
+ ):
75
raise HTTPException(
76
status_code=status.HTTP_403_FORBIDDEN,
- detail="User has no computational profile.",
77
+ detail="Forbidden access.",
78
79
return user
0 commit comments