From becfef8f7bb885da6ceff437f68bb6d43e59efce Mon Sep 17 00:00:00 2001 From: Antoine Guenet Date: Fri, 8 Mar 2019 11:57:09 +0000 Subject: [FIX] web_editor: properly start website edit mode as restricted editor It was impossible to open the website's edit mode as a user with "restricted editor" permissions. The reason was that wysiwyg_multizone was trying to manipulate data that is not injected into the html node when `editable` is false (see `website.layout` template). closes odoo/odoo#31702 Signed-off-by: Pierre Paridans --- addons/website/tests/test_ui.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'addons/website/tests/test_ui.py') diff --git a/addons/website/tests/test_ui.py b/addons/website/tests/test_ui.py index da501da384a..d73a525e791 100644 --- a/addons/website/tests/test_ui.py +++ b/addons/website/tests/test_ui.py @@ -46,3 +46,15 @@ class TestUi(odoo.tests.HttpCase): def test_02_admin_tour_banner(self): self.phantom_js("/", "odoo.__DEBUG__.services['web_tour.tour'].run('banner')", "odoo.__DEBUG__.services['web_tour.tour'].tours.banner.ready", login='admin') + + def test_03_restricted_editor(self): + self.restricted_editor = self.env['res.users'].create({ + 'name': 'Restricted Editor', + 'login': 'restricted', + 'password': 'restricted', + 'groups_id': [(6, 0, [ + self.ref('base.group_user'), + self.ref('website.group_website_publisher') + ])] + }) + self.phantom_js("/", "odoo.__DEBUG__.services['web_tour.tour'].run('restricted_editor')", "odoo.__DEBUG__.services['web_tour.tour'].tours.restricted_editor.ready", login='restricted') -- cgit v1.2.3