diff options
| author | Lucas Lefèvre <lul@odoo.com> | 2020-03-04 14:54:52 +0000 |
|---|---|---|
| committer | Lucas Lefèvre <lul@odoo.com> | 2020-03-04 16:15:56 +0000 |
| commit | 7032dde60a60c6fba730c236b89189a8f56f2bd0 (patch) | |
| tree | 7e79af74858bb5410cfad0aaf504f319d8badc76 /addons/web/static/src/js/tools/debug_manager.js | |
| parent | 01497474d7dea1f1f8f24230995d94edcf210602 (diff) | |
[IMP] web: Add quick security access to debug menu
PURPOSE
Debugging access issues can quickly be a pain.
The goal is to allow to easily debug an access rights issue from the debug tools.
SPECIFICATION
In the debug tools, add the following two new items:
- View Access Rights
- View Record Rules
closes odoo/odoo#46906
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/tools/debug_manager.js')
| -rw-r--r-- | addons/web/static/src/js/tools/debug_manager.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/addons/web/static/src/js/tools/debug_manager.js b/addons/web/static/src/js/tools/debug_manager.js index 8bbdd2bbe1b..b0560805594 100644 --- a/addons/web/static/src/js/tools/debug_manager.js +++ b/addons/web/static/src/js/tools/debug_manager.js @@ -107,6 +107,19 @@ var DebugManager = Widget.extend({ qs.debug = ''; window.location.search = '?' + $.param(qs); }, + /** + * @private + * @param {string} model + * @param {string} operation + * @returns {Promise<boolean>} + */ + _checkAccessRight(model, operation) { + return this._rpc({ + model: model, + method: 'check_access_rights', + kwargs: {operation, raise_exception: false}, + }) + }, }); return DebugManager; |
