diff --git a/auth_session_timeout/models/ir_http.py b/auth_session_timeout/models/ir_http.py index 2e2338fc0e..c3ec9ab676 100644 --- a/auth_session_timeout/models/ir_http.py +++ b/auth_session_timeout/models/ir_http.py @@ -10,7 +10,11 @@ class IrHttp(models.AbstractModel): @classmethod def _authenticate(cls, endpoint): res = super(IrHttp, cls)._authenticate(endpoint=endpoint) - auth_method = endpoint.routing["auth"] - if auth_method == "user" and request and request.session and request.session.uid: + if ( + request + and request.session + and request.session.uid + and not request.env["res.users"].browse(request.session.uid)._is_public() + ): request.env.user._auth_timeout_check() return res