-
- Downloads
[FIX] web,(various): don't pollute session_info for portal users
The `session_info` dictionnary is used to bootstrap some JS code client side (usually in the backend). It includes relevant information, such as some parameters key for the OdooBot onboarding, the Enterprise subscription expiration alert, etc. to avoid triggering a lot of RPC calls upon webclient start. `session_info` is also called by the remote authentication mechanism located at `/web/session/authenticate`, which can be used by external mechanism to obtain a valid session remotely. Revision odoo/odoo@8a28cc2 introduced the concept of cache keys for some oft-requested data (such as menus, translations and dynamic qweb templates) to avoid requesting them on each webclient start, since they tend not to change often. Unfortunately, it introduced a read on the ir.ui.menu model that raised an `AccessError` if the authenticating user was not a member of the `base.group_user` group ('Internal' user type). While fixing that issue, it became apparent that `session_info` returns a whole lot of information through this remote connection route which is entirely unnecessary if not used in the context of a webclient start, such a currencies, the state of the enterprise subscription, etc. This commit fixes the access right issue by removing this non-relevant information from the returned dict (including cache keys) if the user is not an internal one. closes odoo/odoo#40770 X-original-commit: 6e99ac2c Related: odoo/enterprise#6860 Signed-off-by:Damien Bouvy (dbo) <dbo@odoo.com>
Showing
- addons/barcodes/models/ir_http.py 3 additions, 2 deletionsaddons/barcodes/models/ir_http.py
- addons/base_setup/models/ir_http.py 2 additions, 1 deletionaddons/base_setup/models/ir_http.py
- addons/hr_timesheet/models/ir_http.py 5 additions, 5 deletionsaddons/hr_timesheet/models/ir_http.py
- addons/mail/models/ir_http.py 2 additions, 1 deletionaddons/mail/models/ir_http.py
- addons/mail_bot/models/ir_http.py 2 additions, 1 deletionaddons/mail_bot/models/ir_http.py
- addons/web/models/ir_http.py 32 additions, 26 deletionsaddons/web/models/ir_http.py
Please register or sign in to comment