Skip to content

Commit

Permalink
Merge PR #535 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by thomaspaulb
  • Loading branch information
OCA-git-bot committed Feb 16, 2024
2 parents 65739a1 + cbdc93d commit f5ad46c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions auth_session_timeout/models/ir_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.env and request.env.user:
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

0 comments on commit f5ad46c

Please sign in to comment.