add RoleStorage; add mutations for community

This commit is contained in:
knst-kotov
2021-11-24 18:53:01 +03:00
parent 9ab334de71
commit 2d8dc5c3bd
6 changed files with 52 additions and 19 deletions

View File

@@ -71,7 +71,7 @@ class JWTAuthenticate(AuthenticationBackend):
return AuthCredentials(scopes=[]), AuthUser(user_id=None)
user = await UserStorage.get_user(payload.user_id)
scopes = user.get_permission()
scopes = await user.get_permission()
return AuthCredentials(user_id=payload.user_id, scopes=scopes, logged_in=True), user
class EmailAuthenticate: