diff --git a/addons/web_editor/models/ir_websocket.py b/addons/web_editor/models/ir_websocket.py index a374890f9ae..5fb70667b26 100644 --- a/addons/web_editor/models/ir_websocket.py +++ b/addons/web_editor/models/ir_websocket.py @@ -23,7 +23,7 @@ class IrWebsocket(models.AbstractModel): res_id = int(match[3]) # Verify access to the edition channel. - if not self.env.user._is_internal(): + if self.env.user._is_public(): raise AccessDenied() document = self.env[model_name].browse([res_id]) diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index 8b704db8d35..096866b57b8 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -324,8 +324,7 @@ export class Wysiwyg extends Component { let editorCollaborationOptions; if ( options.collaborationChannel && - // Hack: check if mail module is installed. - session.notification_type + this._hasICEServers() ) { editorCollaborationOptions = this.setupCollaboration(options.collaborationChannel); if (this.options.collaborativeTrigger === 'start') { @@ -2864,6 +2863,12 @@ export class Wysiwyg extends Component { _bindOnBlur() { this.$editable.on('blur', this._onBlur); } + + _hasICEServers() { + // Hack: check if mail module is installed. + session.notification_type + } + /** * Saves a base64 encoded image as an attachment. * Relies on _saveModifiedImage being called after it for webp.