Commit Graph
15 Commits
Author SHA1 Message Date
Cédric Krier d7ed5f91f5 Fix flake8 errors and warnings
We add the flake8 configuration used so we ensure everyone uses the same.
We remove the usage of __all__ for non public API.
When possible, we rationalize the class name according to its __name__ and module.

issue9082
review297061002
2020-03-01 12:33:54 +01:00
Cédric Krier 9fff734230 Raise proper exceptions when context is missing in RPC
issue8565
review257921003
2019-08-22 22:48:13 +02:00
Cédric Krier 0fbf5cecd2 Add cache management on RPC
issue8233
review257231002
2019-04-08 10:10:40 +02:00
Cédric Krier 5a7aca31ea Manage session with max_age and timeout
and clear session when password is changed.

The sessions are checked using on a fix maximum age of 30 days using the
create_date value. The write_date is updated as long as the delay of the last
update is not bigger than the session timeout.
RPC can request a fresh session. A fresh session is a session that was updated
last time before the session timeout. If it is not the case, the session is
deleted and a request to create a new session is sent to the client.
All the sessions of the users for which the password has been changed are also
deleted in order to ensure that stolen session can no more be used.
We use this new feature for set_preferences of user instead of duplicate the
login mechanism.

issue7568
review53331002
2018-08-26 18:04:05 +02:00
Cédric Krier d2a461390a Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier ef297a8cd1 Deep copy the context before modifying in RPC
issue7287
review46271002
2018-03-30 18:15:04 +02:00
Cédric Krier fe674cef55 Enforce unique list of records on method calls
An option is added on RPC definition to enforce uniqueness of records
instantiated. The key methods ModeView.button and Workflow.transition have an
assert to detect error in development code.

issue6184
review36411002
2017-07-16 23:49:15 +02:00
Cédric Krier 26312e43f9 Use context to instantiate records in RPC
issue5654
review26411002
2016-06-23 18:48:52 +02:00
Jean Cavallo dc0b21c9c3 Do not clear _datetime entry from context in rpc -> convert
issue4497
review8871002
2015-01-20 11:58:31 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier 360f39f89d Make cache size configurable
* Clean private context keyword in RPC
* Add cache section in configuration

issue4320
review10641002
2014-11-19 21:35:51 +01:00
Cédric Krier a2c8111f26 Use context to check model and field access
* Model and Field access checked only if _check_access is set
* Add check_access to RPC
* Add check_access to Wizard and Report

issue4081
review8481002
2014-09-17 21:43:53 +02:00
Cédric Krier f52fe8e45f Use a sequence of records, values in write
issue3499
review1641003
2013-12-19 14:44:01 +01:00
Cédric Krier 46fd6a18bb Fix RPC.convert usage to return a copy of args and kwargs
issue3521
review1921002
2013-11-28 23:07:46 +01:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00