bio/about
This commit is contained in:
parent
ca6fc3c32d
commit
6e80360d98
|
@ -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(
|
||||||
|
|
|
@ -157,7 +157,7 @@ async def get_user_roles(slug):
|
||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
|
|
||||||
return roles
|
return [] # roles
|
||||||
|
|
||||||
|
|
||||||
@mutation.field("updateProfile")
|
@mutation.field("updateProfile")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user