bio/about

This commit is contained in:
tonyrewin 2022-12-01 13:05:02 +03:00
parent ca6fc3c32d
commit 6e80360d98
2 changed files with 3 additions and 2 deletions

View File

@ -41,6 +41,7 @@ class JWTAuthenticate(AuthenticationBackend):
user = ( user = (
session.query(User).options( session.query(User).options(
joinedload(User.roles), joinedload(User.roles),
joinedload(Role.permissions),
joinedload(User.ratings) joinedload(User.ratings)
).filter( ).filter(
User.id == id User.id == id
@ -52,7 +53,7 @@ class JWTAuthenticate(AuthenticationBackend):
if not user: if not user:
return AuthCredentials(scopes=[]), AuthUser(user_id=None) return AuthCredentials(scopes=[]), AuthUser(user_id=None)
scopes = user.get_permission() scopes = [] # user.get_permission()
return ( return (
AuthCredentials( AuthCredentials(

View File

@ -157,7 +157,7 @@ async def get_user_roles(slug):
.all() .all()
) )
return roles return [] # roles
@mutation.field("updateProfile") @mutation.field("updateProfile")