From d04a42022b2338d529d245080fa506f72cdc8daa Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 26 Sep 2016 13:27:48 +0200 Subject: [REF] website, *: review website access rights * event, website_event, website_forum, * website_hr_recruitment, website_sale Website access rights were buggy. The editor assets and website editor assets have to be loaded together to work so the previous behavior which only loaded one with the restricted access right was not right. Also, people which had the "Manager" access right for model like event or job only got access to creation and edition of those objects if they had the full access to website access rights. Now the website module creates the two same groups : * group_website_publisher: load all editor assets, give access to page creation for model the user has access (event, job, ...) and edition of those pages * group_website_designer: implies the first one and give access in creation and edition of all pages + access of all website menus The manager access rights for event, product, jobs, etc now implies the group_website_publisher group for the user (so that the manager have the editor assets and editor ui). Note: some python codes use the group_website_publisher for no right reason, this has to be adapted. --- addons/web_editor/static/src/js/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web_editor/static/src/js/editor.js') diff --git a/addons/web_editor/static/src/js/editor.js b/addons/web_editor/static/src/js/editor.js index 1163635146f..240a0a36121 100644 --- a/addons/web_editor/static/src/js/editor.js +++ b/addons/web_editor/static/src/js/editor.js @@ -16,7 +16,7 @@ var editor = {}; editor.dummy = function () {return true;}; // used for snippets, options... -editor.editable = !!$('html').data('editable'); +editor.editable = !!($('html').data('editable') || $("[data-oe-model]").length); // temporary hack, this should be done in python ajax.loadXML('/web_editor/static/src/xml/editor.xml', qweb); -- cgit v1.2.3