fix getSession, fix getAuthor

This commit is contained in:
2022-11-24 18:19:58 +03:00
parent 0ad10cffec
commit b2b8cf747f
4 changed files with 12 additions and 22 deletions

View File

@@ -68,7 +68,7 @@ def login_required(func):
def permission_required(resource, operation, func):
@wraps(func)
async def wrap(parent, info: GraphQLResolveInfo, *args, **kwargs):
# print('[auth.authenticate] login required for %r with info %r' % (func, info)) # debug only
print('[auth.authenticate] permission_required for %r with info %r' % (func, info)) # debug only
auth: AuthCredentials = info.context["request"].auth
if not auth.logged_in:
return {"error": auth.error_message or "Please login"}