Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] auth_session_timeout: Migration to 18.0. #766

Closed
wants to merge 43 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
6f53937
inactive_session_timeout > auth_session_timeout
pedrobaeza Aug 29, 2016
06aa422
auth_session_timeout: References to old name
pedrobaeza Aug 29, 2016
c933761
Make modules uninstallable
pedrobaeza Oct 6, 2016
b50a0f5
Rename manifest files
pedrobaeza Oct 6, 2016
087b716
auth_session_timeout: Migrate to v10 * Bump versions * Installable to…
lasley Oct 21, 2016
95d773e
Module auth_session_timeout: Pluggability (#887)
jmorgannz Sep 6, 2017
58cc7d1
auth_session_timeout: Deprecate backwards compat + improve * Deprecat…
lasley Nov 6, 2017
d29d717
corrects AttributeError: 'HttpRequest' object has no attribute 'http'…
beenhere4hours Nov 29, 2017
b87319a
auth_session_timeout: Migration to 11.0
nadiaafa Feb 18, 2018
ac6f3ab
[MIG] auth_session_timeout: Migration to version 11.0
zaoral Jul 12, 2018
19e5bd7
[12.0][MIG] auth_session_timeout
Jun 6, 2019
a5c153a
Translated using Weblate (Portuguese (Brazil))
Sep 3, 2019
720282f
[MIG] auth_session_timeout: Migration to 13.0
rruebner Oct 1, 2019
8278e5e
[REF] pre-commit lint
dreispt Apr 1, 2020
cb44219
Update translation files
oca-transbot May 13, 2020
defe265
Update translation files
oca-transbot Aug 16, 2020
39d4d29
[MIG] auth_session_timeout: Migration to 14.0
Chandresh-SerpentCS Feb 10, 2021
6b78571
[FIX] auth_session_timeout: session timeout applies only to user
pierre-halleux Mar 18, 2021
ca64742
auth_session_timeout 14.0.1.0.1
OCA-git-bot May 5, 2021
f0beb75
Translated using Weblate (Portuguese (Brazil))
Feb 1, 2022
15ff94a
[IMP] auth_session_timeout: black, isort
flachica Mar 1, 2022
3660379
[MIG] auth_session_timeout: Migration to 15.0
flachica Mar 1, 2022
ac263fb
Translated using Weblate (Catalan)
Noel000 Apr 13, 2022
49632c5
Translated using Weblate (Italian)
mymage Dec 28, 2022
396d510
Translated using Weblate (Italian)
francesco-ooops Mar 7, 2023
c977257
[MIG] auth_session_timeout: Migration to 16.0
bosd Apr 20, 2023
6f427e0
[13.0][IMP] timeout check triggered on session uid
gfcapalbo Jan 27, 2022
b606150
[FIX] auth_session_timeout: problem whereby page is refreshed with F5…
Jul 2, 2023
acd772c
[UPD] Update auth_session_timeout.pot
Sep 23, 2023
bb84401
[BOT] post-merge updates
OCA-git-bot Sep 23, 2023
da64855
Update translation files
weblate Sep 23, 2023
71b4a60
Translated using Weblate (Spanish)
Ivorra78 Oct 3, 2023
a969d8e
Update translation files
weblate Oct 9, 2023
f55e795
Translated using Weblate (Spanish)
Ivorra78 Oct 15, 2023
3e15e58
Translated using Weblate (Italian)
mymage Jan 3, 2024
df2105a
Translated using Weblate (Catalan)
jabelchi May 10, 2024
7b22446
[IMP] auth_session_timeout: pre-commit auto fixes
Loregs2 May 13, 2024
ecc5329
[MIG] auth_session_timeout: Migration to 17.0
Loregs2 May 13, 2024
5893284
[17.0][IMP] auth_session_timeout: user websocket instead of longpolling
Loregs2 May 13, 2024
58f4795
[ADD] auth_session_timeout:Added pre-migration script for inactive_se…
bizzappdev Aug 22, 2024
4e3dc45
[UPD] Update auth_session_timeout.pot
Oct 31, 2024
23669e3
[BOT] post-merge updates
OCA-git-bot Oct 31, 2024
e2723cb
[MIG] auth_session_timeout: Migration to 18.0
mcodes-o Feb 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[MIG] auth_session_timeout: Migration to version 11.0
New changes for move module, clean module, apply new oca guideline and make
compatible with 11.0:

* Move module from oca/server-tools:10.0  to oca/server-auth:11.0
* Remove .DS_Store files, addd by mistake in early changes and not needed.
* Fix error when make RPC request. Applied thanks to comment added by @christophlsa. For more information go to OCA/server-tools#1163 (review)
* Update version to the first one in 11.0
* Update README to match new guideline
* Remove she bang coding
* Use _authenticate method instead of deprecated method check. For more information go to https://github.com/odoo/odoo/blob/11.0/odoo/http.py#L1049
* Improve auth_session_timeout method return raise SessionExpiredException exception instead of False. This will show a "session expired please reload page" message to the user.
* Fix update unitet test. make then turn green and the update then to make them match with new changes

  - There was not getmtime() result definied in this test case, For that reason was returning a MagicMock() object, For this case their are trying to test that the session is valid, this is the same that the path of the file with session is not expired. To simulate that I just updated for the test case the getmtime() result to a value that will be greater than the delay expected: I used the current time This way when evaluationg if the sessions is expire will return False instead of TypeError: unorderable types: MagicMock() < float() The unit test still works the same and the result is without errors.

* Fix plylint errors:

  - E302 expected 2 blank lines,
  - Not used variable and not valid var name. Remove e varaible since is not valid name and this one is not been used.
  • Loading branch information
zaoral authored and mcodes-o committed Feb 21, 2025

Verified

This commit was signed with the committer’s verified signature.
mcodes-o MCodes
commit ac6f3ab10b07ab1bfc5780e30043985877a0a48b
Binary file removed auth_session_timeout/.DS_Store
Binary file not shown.
75 changes: 54 additions & 21 deletions auth_session_timeout/README.rst
Original file line number Diff line number Diff line change
@@ -1,69 +1,102 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

=========================
Inactive Sessions Timeout
=========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github
:target: https://github.com/OCA/server-auth/tree/11.0/auth_session_timeout
:alt: OCA/server-auth
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-auth-11-0/server-auth-11-0-auth_session_timeout
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/251/11.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module was written to be able to kill(logout) all inactive sessions since
a given delay. On each request the server checks if the session is yet valid
regarding the expiration delay. If not a clean logout is operated.


**Table of contents**

.. contents::
:local:

Configuration
=============


Two system parameters are available:

* ``inactive_session_time_out_delay``: validity of a session in seconds
(default = 2 Hours)
* ``inactive_session_time_out_ignored_url``: technical urls where the check
does not occur


Usage
=====

Setup the session parameters as described above.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/11.0

Known issues / Roadmap
======================


Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-auth/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20auth_session_timeout%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* ACSONE SA/NV
* Dhinesh D
* Jesse Morgan
* LasLabs

Contributors
------------
~~~~~~~~~~~~

* Cédric Pigeon <cedric.pigeon@acsone.eu>
* Dhinesh D <dvdhinesh.mail@gmail.com>
* Jesse Morgan <jmorgan.nz@gmail.com>
* Dave Lasley <dave@laslabs.com>
* Nadia Afakrouch <nadia.afa@gmail.com>


Maintainers
~~~~~~~~~~~

Maintainer
----------
This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.
This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/11.0/auth_session_timeout>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion auth_session_timeout/__manifest__.py
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
'maintainer': 'Odoo Community Association (OCA)',
'website': "http://acsone.eu",
'category': 'Tools',
'version': '11.0.1.0.1',
'version': '11.0.1.0.0',
'license': 'AGPL-3',
'data': [
'data/ir_config_parameter_data.xml'
35 changes: 35 additions & 0 deletions auth_session_timeout/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auth_session_timeout
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-01 02:09+0000\n"
"PO-Revision-Date: 2017-12-01 02:09+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_http
msgid "HTTP routing"
msgstr ""

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_res_users
msgid "Users"
msgstr "المستخدمون"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_config_parameter
msgid "ir.config_parameter"
msgstr ""
30 changes: 30 additions & 0 deletions auth_session_timeout/i18n/auth_session_timeout.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auth_session_timeout
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_http
msgid "HTTP routing"
msgstr ""

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_res_users
msgid "Users"
msgstr ""

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_config_parameter
msgid "ir.config_parameter"
msgstr ""

34 changes: 34 additions & 0 deletions auth_session_timeout/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auth_session_timeout
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-01 02:09+0000\n"
"PO-Revision-Date: 2017-12-01 02:09+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_http
msgid "HTTP routing"
msgstr ""

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_res_users
msgid "Users"
msgstr "Usuaris"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_config_parameter
msgid "ir.config_parameter"
msgstr ""
34 changes: 34 additions & 0 deletions auth_session_timeout/i18n/da.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auth_session_timeout
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-01 02:09+0000\n"
"PO-Revision-Date: 2017-12-01 02:09+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Danish (https://www.transifex.com/oca/teams/23907/da/)\n"
"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_http
msgid "HTTP routing"
msgstr ""

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_res_users
msgid "Users"
msgstr "Brugere"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_config_parameter
msgid "ir.config_parameter"
msgstr ""
24 changes: 18 additions & 6 deletions auth_session_timeout/i18n/de.po
Original file line number Diff line number Diff line change
@@ -3,21 +3,33 @@
# * auth_session_timeout
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Niki Waibel <niki.waibel@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: server-tools (8.0)\n"
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-29 11:14+0000\n"
"PO-Revision-Date: 2015-09-18 13:55+0000\n"
"Last-Translator: <>\n"
"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-8-0/language/de/)\n"
"POT-Creation-Date: 2017-12-01 02:09+0000\n"
"PO-Revision-Date: 2017-12-01 02:09+0000\n"
"Last-Translator: Niki Waibel <niki.waibel@gmail.com>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_http
msgid "HTTP routing"
msgstr ""

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_res_users
msgid "Users"
msgstr "Benutzer"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_config_parameter
msgid "ir.config_parameter"
msgstr "ir.config_parameter"
35 changes: 35 additions & 0 deletions auth_session_timeout/i18n/el_GR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * auth_session_timeout
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-01 02:09+0000\n"
"PO-Revision-Date: 2017-12-01 02:09+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/"
"el_GR/)\n"
"Language: el_GR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_http
msgid "HTTP routing"
msgstr ""

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_res_users
msgid "Users"
msgstr "Χρήστες"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_config_parameter
msgid "ir.config_parameter"
msgstr ""
24 changes: 18 additions & 6 deletions auth_session_timeout/i18n/es.po
Original file line number Diff line number Diff line change
@@ -3,21 +3,33 @@
# * auth_session_timeout
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: server-tools (8.0)\n"
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-29 11:14+0000\n"
"PO-Revision-Date: 2015-09-18 13:55+0000\n"
"Last-Translator: <>\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/es/)\n"
"POT-Creation-Date: 2017-12-01 02:09+0000\n"
"PO-Revision-Date: 2017-12-01 02:09+0000\n"
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>, 2017\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_http
msgid "HTTP routing"
msgstr ""

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_res_users
msgid "Users"
msgstr "Usuarios"

#. module: auth_session_timeout
#: model:ir.model,name:auth_session_timeout.model_ir_config_parameter
msgid "ir.config_parameter"
msgstr "ir.config_parameter"
Loading