From 7032dde60a60c6fba730c236b89189a8f56f2bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Lef=C3=A8vre?= Date: Wed, 4 Mar 2020 14:54:52 +0000 Subject: [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) --- addons/web/static/src/js/tools/debug_manager.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'addons/web/static/src/js/tools/debug_manager.js') 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} + */ + _checkAccessRight(model, operation) { + return this._rpc({ + model: model, + method: 'check_access_rights', + kwargs: {operation, raise_exception: false}, + }) + }, }); return DebugManager; -- cgit v1.2.3