@elementor/editor-global-classes 4.4.0-1091 → 4.4.0-1093
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/sync-with-document-save.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3084,7 +3084,7 @@ import { useEffect as useEffect7 } from "react";
|
|
|
3084
3084
|
import { __privateListenTo as listenTo, v1ReadyEvent } from "@elementor/editor-v1-adapters";
|
|
3085
3085
|
|
|
3086
3086
|
// src/sync-with-document-save.ts
|
|
3087
|
-
import { getCurrentUser } from "@elementor/editor-current-user";
|
|
3087
|
+
import { getCurrentUser, isContentOnlyUser } from "@elementor/editor-current-user";
|
|
3088
3088
|
import { setDocumentModifiedStatus as setDocumentModifiedStatus2 } from "@elementor/editor-documents";
|
|
3089
3089
|
import { registerDataHook as registerDataHook2 } from "@elementor/editor-v1-adapters";
|
|
3090
3090
|
import { __getState as getState6, __subscribeWithSelector as subscribeWithSelector2 } from "@elementor/store";
|
|
@@ -3106,7 +3106,7 @@ function syncDirtyState() {
|
|
|
3106
3106
|
function triggerSave(panelActions, context2 = "preview") {
|
|
3107
3107
|
const user = getCurrentUser();
|
|
3108
3108
|
const canEdit = user?.capabilities.includes(UPDATE_CLASS_CAPABILITY_KEY);
|
|
3109
|
-
if (!canEdit) {
|
|
3109
|
+
if (!canEdit || isContentOnlyUser()) {
|
|
3110
3110
|
return null;
|
|
3111
3111
|
}
|
|
3112
3112
|
if (pendingSave) {
|