fix-no-auth
This commit is contained in:
parent
a76bb2aeb6
commit
d8c293a56e
|
@ -58,7 +58,7 @@ def login_required(func):
|
||||||
# print('[auth.authenticate] login required for %r with info %r' % (func, info)) # debug only
|
# print('[auth.authenticate] login required for %r with info %r' % (func, info)) # debug only
|
||||||
auth: AuthCredentials = info.context["request"].auth
|
auth: AuthCredentials = info.context["request"].auth
|
||||||
# print(auth)
|
# print(auth)
|
||||||
if not auth.logged_in:
|
if not auth or not auth.logged_in:
|
||||||
raise OperationNotAllowed(auth.error_message or "Please login")
|
raise OperationNotAllowed(auth.error_message or "Please login")
|
||||||
return await func(parent, info, *args, **kwargs)
|
return await func(parent, info, *args, **kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user