Skip to content

[12.0][MIG] auth_session_timeout - #109

Closed
jarroyomorales wants to merge 14 commits into
OCA:12.0from
jarroyomorales:12.0-mig-auth_session_timeout
Closed

jarroyomorales wants to merge 14 commits into
OCA:12.0from
jarroyomorales:12.0-mig-auth_session_timeout

Conversation

@jarroyomorales

Copy link
Copy Markdown

Migration of auth_session_timeout to 12.0.
No changes.

pedrobaeza and others added 14 commits June 6, 2019 12:35
… True * Add Usage section to ReadMe w/ Runbot link * `_crypt_context` now directly exposes the `CryptContext` * Change all instances of openerp to odoo * Add test coverage to IrConfigParameter * Add test coverage for res.users * Remove db from `get_session_parameters` method call * Remove deprecated skiparg for ormcache * Fix tests & lint * Switch cache to use self.cr.dbname * Fix ormcache
* Module auth_session_timeout:
---------------------------

* Refactor to allow other modules to inherit and augment or override the following:
** Session expiry time (deadline) calculation
** Ignored URLs
** Final session expiry (with possibility to late-abort)
* Re-ordered functionality to remove unnecessary work, as this code is called very often.
* Do not expire a session if delay gets set to zero (or unset / false)

* WIP

* Fixed flake8 lint errors

* Fixed flake8 lint errors

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Module: auth-session-timeout: Refactor ResUser tests to use `unittest.mock` patching

* Module: auth_session_timeout: Fixed flake8 lint errors

* Module: auth_session_timeout: Fixed flake8 lint errors
…e backwards compatibility methods that were retained during v9 rework * Upgrade API and rename a few things for PEP-8 * Switch to HttpCase for tests * Switch to isolated build
… (#1070)

* corrects AttributeError: 'HttpRequest' object has no attribute 'http'

* updates the module version number for pull request #1070
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.
@pedrobaeza pedrobaeza added this to the 12.0 milestone Jun 6, 2019
@OCA-git-bot OCA-git-bot mentioned this pull request Jun 6, 2019
19 tasks
@jarroyomorales

Copy link
Copy Markdown
Author

@etobella ping

Comment thread auth_session_timeout/models/res_users.py
@mohamedhagag

Copy link
Copy Markdown

Just tested this module with v12.0 and it works fine without any change.

@etobella

etobella commented Aug 2, 2019

Copy link
Copy Markdown
Member

@mohamedhagag if it is right could you approve the PR? This way it is easier for administrators to check and merge 😄

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot merge

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Rebased to 12.0-ocabot-merge-pr-109-by-pedrobaeza-bump-no, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Aug 2, 2019
Signed-off-by pedrobaeza
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 37638ee. Thanks a lot for contributing to OCA. ❤️

PS: Don't worry if GitHub says there are unmerged commits: it is due to a rebase before merge. All commits of this PR have been merged into 12.0.

@OCA-git-bot OCA-git-bot closed this Aug 2, 2019
SiesslPhillip pushed a commit to grueneerde/OCA-server-auth that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-auth (12.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.