Skip to content

Commit

Permalink
Merge pull request #427 from OCA/14.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/server-auth (14.0)
  • Loading branch information
bt-admin authored Feb 17, 2024
2 parents 74fcfd9 + a0ff28d commit 29cd795
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ addon | version | maintainers | summary
[auth_oauth_multi_token](auth_oauth_multi_token/) | 14.0.1.0.0 | | Allow multiple connection with the same OAuth account
[auth_oidc](auth_oidc/) | 14.0.1.1.1 | [![sbidoul](https://github.com/sbidoul.png?size=30px)](https://github.com/sbidoul) | Allow users to login through OpenID Connect Provider
[auth_saml](auth_saml/) | 14.0.1.1.2 | | SAML2 Authentication
[auth_session_timeout](auth_session_timeout/) | 14.0.1.0.1 | | This module disable all inactive sessions since a given delay
[auth_session_timeout](auth_session_timeout/) | 14.0.1.0.2 | | This module disable all inactive sessions since a given delay
[auth_signup_verify_email](auth_signup_verify_email/) | 14.0.1.0.1 | | Force uninvited users to use a good email for signup
[auth_user_case_insensitive](auth_user_case_insensitive/) | 14.0.1.0.1 | | Makes the user login field case insensitive
[base_user_show_email](base_user_show_email/) | 14.0.1.0.0 | | Untangle user login and email
Expand Down
2 changes: 1 addition & 1 deletion auth_session_timeout/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Inactive Sessions Timeout
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9f36eb72dc7e1723492d7f07588a56735dbb9b31a7480a5c06ef7262880e0ec6
!! source digest: sha256:f06251257e0e1191d9149f7eca32bf6807bb85b5ef2c59ca7ead86735c78c7b6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion auth_session_timeout/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"maintainer": "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-auth",
"category": "Tools",
"version": "14.0.1.0.1",
"version": "14.0.1.0.2",
"license": "AGPL-3",
"data": ["data/ir_config_parameter_data.xml"],
"installable": True,
Expand Down
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
3 changes: 1 addition & 2 deletions auth_session_timeout/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -367,7 +366,7 @@ <h1 class="title">Inactive Sessions Timeout</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9f36eb72dc7e1723492d7f07588a56735dbb9b31a7480a5c06ef7262880e0ec6
!! source digest: sha256:f06251257e0e1191d9149f7eca32bf6807bb85b5ef2c59ca7ead86735c78c7b6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-auth/tree/14.0/auth_session_timeout"><img alt="OCA/server-auth" src="https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-auth-14-0/server-auth-14-0-auth_session_timeout"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-auth&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module was written to be able to kill(logout) all inactive sessions since
Expand Down

0 comments on commit 29cd795

Please sign in to comment.