-
- Downloads
[FIX] web_editor, website: fix website editor as restricted editor
When assigned the role of restricted editor, there are many ways to break the web_editor when trying to do actions that should be unavailable. There is a traceback for the following scenarios under some circumstances (mainly because of pages without editable areas or features without the proper access rights): - Drag and dropping snippet when Restricted Editor. - Clicking on product when Restricted Editor in /shop. - Clicking on product image on specific product page. - Clicking on user name (e.g. Marc Demo). - Clicking on menu items or logo. - Clicking on a blog's image in /blog. - Clicking on a blog's image on specific blog page. - Clicking on calendar's image in /calendar. There is now no longer a traceback which makes the editor crash or freeze. This mimics the behavior in other cases where the editor does not show a traceback, but there is no message indicating that the action is unauthorized. When accessing a menu that cannot be edited, the "Edit the menu" button is not shown to the restricted editor. task-2747895 opw-3164176 closes odoo/odoo#76900 Signed-off-by:Quentin Smetz (qsm) <qsm@odoo.com> Co-authored-by:
Benjamin Vray <bvr@odoo.com> Co-authored-by:
qsm-odoo <qsm@odoo.com>
Showing
- addons/web_editor/static/src/js/editor/snippets.editor.js 10 additions, 1 deletionaddons/web_editor/static/src/js/editor/snippets.editor.js
- addons/website/static/src/js/editor/snippets.options.js 29 additions, 10 deletionsaddons/website/static/src/js/editor/snippets.options.js
- addons/website/static/src/js/menu/edit.js 1 addition, 1 deletionaddons/website/static/src/js/menu/edit.js
Loading