sharing/token: fix result code
This commit is contained in:
@@ -585,12 +585,15 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
|
|||||||
self.profiler_per_request_method[request_method].disable()
|
self.profiler_per_request_method[request_method].disable()
|
||||||
|
|
||||||
if (status, headers, answer, xml_request) == httputils.NOT_ALLOWED:
|
if (status, headers, answer, xml_request) == httputils.NOT_ALLOWED:
|
||||||
logger.info("Access to %r denied for %s", path,
|
if path.startswith("/.token"):
|
||||||
repr(user) if user else "anonymous user")
|
logger.info("Access to %r denied", path)
|
||||||
|
else:
|
||||||
|
logger.info("Access to %r denied for %s", path, repr(user) if user else "anonymous user")
|
||||||
else:
|
else:
|
||||||
status, headers, answer, xml_request = httputils.NOT_ALLOWED
|
status, headers, answer, xml_request = httputils.NOT_ALLOWED
|
||||||
|
|
||||||
if ((status, headers, answer, xml_request) == httputils.NOT_ALLOWED and not user and
|
if ((status, headers, answer, xml_request) == httputils.NOT_ALLOWED and not user and
|
||||||
|
not path.startswith("/.token") and
|
||||||
not external_login):
|
not external_login):
|
||||||
# Unknown or unauthorized user
|
# Unknown or unauthorized user
|
||||||
logger.debug("Asking client for authentication")
|
logger.debug("Asking client for authentication")
|
||||||
|
|||||||
Reference in New Issue
Block a user