diff --git a/src/js/main.js b/src/js/main.js index fb264db..efa6646 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -685,6 +685,9 @@ function initWhiteboard() { ReadOnlyService.deactivateReadOnlyMode(); InfoService.displayInfo(); } + + // In any case, if we are on read-only whiteboard we activate read-only mode + if (ConfigService.isReadOnly) ReadOnlyService.activateReadOnlyMode(); }); //Prevent site from changing tab on drag&drop diff --git a/src/js/services/ReadOnlyService.js b/src/js/services/ReadOnlyService.js index 449c4c4..66f2503 100644 --- a/src/js/services/ReadOnlyService.js +++ b/src/js/services/ReadOnlyService.js @@ -1,3 +1,5 @@ +import ConfigService from "./ConfigService"; + /** * Class the handle the read-only logic */ @@ -40,6 +42,8 @@ class ReadOnlyService { * Deactivate read-only mode */ deactivateReadOnlyMode() { + if (ConfigService.isReadOnly) return; + this.#readOnlyActive = false; $(".whiteboard-tool").prop("disabled", false);