sharing/token: fix result code

This commit is contained in:
Peter Bieringer
2026-04-02 13:10:17 +02:00
parent 594c477d73
commit 2bf174f012

View File

@@ -585,12 +585,15 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
self.profiler_per_request_method[request_method].disable()
if (status, headers, answer, xml_request) == httputils.NOT_ALLOWED:
logger.info("Access to %r denied for %s", path,
repr(user) if user else "anonymous user")
if path.startswith("/.token"):
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:
status, headers, answer, xml_request = httputils.NOT_ALLOWED
if ((status, headers, answer, xml_request) == httputils.NOT_ALLOWED and not user and
not path.startswith("/.token") and
not external_login):
# Unknown or unauthorized user
logger.debug("Asking client for authentication")