@localazy/strapi-plugin 1.3.0 → 1.6.0
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/README.md +30 -0
- package/dist/_chunks/{FetchIdentity-BJGoZPpM.mjs → FetchIdentity-Bm7bc5bS.mjs} +36 -44
- package/dist/_chunks/{FetchIdentity-CtBRO-Cn.js → FetchIdentity-CcEjakiz.js} +25 -33
- package/dist/_chunks/{LanguagesSelector-DJxgCwgM.mjs → LanguagesSelector-B1rwN7-Y.mjs} +4 -3
- package/dist/_chunks/{LanguagesSelector-CNaKrS-m.js → LanguagesSelector-DejYCwBl.js} +4 -3
- package/dist/_chunks/{LocalazyApp-CJRpsTKr.mjs → LocalazyApp-C4kbsnQh.mjs} +148 -35
- package/dist/_chunks/{LocalazyApp-B1qCCEPe.js → LocalazyApp-jPO7Yr1S.js} +154 -41
- package/dist/_chunks/{LocalazyContentTransferSetup-CLAWn95U.mjs → LocalazyContentTransferSetup-C1wDD9hA.mjs} +58 -22
- package/dist/_chunks/{LocalazyContentTransferSetup-CCxiLHdG.js → LocalazyContentTransferSetup-DZh4ZdSi.js} +63 -27
- package/dist/_chunks/{LocalazyGlobalSettings-BJ5qfFfK.js → LocalazyGlobalSettings-D76it6rn.js} +57 -26
- package/dist/_chunks/{LocalazyGlobalSettings-Z-4Ykc_J.mjs → LocalazyGlobalSettings-DOW5rjLn.mjs} +56 -25
- package/dist/_chunks/{LocalazyPanel-CL_mzzfD.mjs → LocalazyPanel-C_Z4W49T.mjs} +12 -6
- package/dist/_chunks/{LocalazyPanel-DE3TtHOQ.js → LocalazyPanel-D2LQpqii.js} +14 -8
- package/dist/_chunks/{LocalazyStatusColumn-R5n6q_cx.mjs → LocalazyStatusColumn-C_ZCd_s7.mjs} +10 -4
- package/dist/_chunks/{LocalazyStatusColumn-BMLcklG-.js → LocalazyStatusColumn-Dy6N4_X6.js} +10 -4
- package/dist/_chunks/{RequireLocalazyAuth-WKKFdQlR.js → RequireLocalazyAuth-BVwF0bRC.js} +31 -4
- package/dist/_chunks/{RequireLocalazyAuth-Dzsu6UNS.mjs → RequireLocalazyAuth-DNhTZZ_6.mjs} +32 -5
- package/dist/_chunks/{entry-exclusion-service-DxqTlZFR.mjs → entry-exclusion-service-CF_yNCly.mjs} +1 -1
- package/dist/_chunks/{entry-exclusion-service-CggmAKxq.js → entry-exclusion-service-CH3ZoJQN.js} +1 -1
- package/dist/_chunks/{has-model-changed-FMGVcFHU.mjs → has-model-changed-CVJEuGxM.mjs} +2 -2
- package/dist/_chunks/{has-model-changed-BR53L6pA.js → has-model-changed-DdYbyv0v.js} +2 -2
- package/dist/_chunks/{i18n-QelOdIB2.mjs → i18n-76ox2llT.mjs} +9 -2
- package/dist/_chunks/{i18n-CAsbU4pi.js → i18n-C5ucROBh.js} +9 -2
- package/dist/_chunks/{index-BmxGKspv.js → index-CEGaWWh3.js} +33 -11
- package/dist/_chunks/{index-BK7lmZSN.js → index-CTkxoioB.js} +1 -0
- package/dist/_chunks/{index-toauQlIK.mjs → index-DP2ugzc_.mjs} +34 -12
- package/dist/_chunks/{index-CHjIMO9T.mjs → index-shryj0jT.mjs} +19 -18
- package/dist/_chunks/{strapi-api-base-CT9lknwW.js → strapi-api-base-CCUuu7EY.js} +1 -1
- package/dist/_chunks/{strapi-api-base-BflplVsH.mjs → strapi-api-base-IiMEtDoH.mjs} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/LocalazyStatusColumn.d.ts +1 -1
- package/dist/admin/src/constants/permissions.d.ts +29 -0
- package/dist/admin/src/modules/@common/components/LanguagesSelector.d.ts +1 -0
- package/dist/admin/src/modules/activity-logs/locale/en.d.ts +4 -0
- package/dist/admin/src/modules/activity-logs/services/debug-bundle-service.d.ts +10 -0
- package/dist/admin/src/modules/login/locale/en.d.ts +1 -0
- package/dist/admin/src/modules/plugin-settings/components/Tree.d.ts +1 -0
- package/dist/admin/src/modules/plugin-settings/components/TreeItem.d.ts +1 -0
- package/dist/admin/src/modules/plugin-settings/components/WebhookSetup.d.ts +4 -1
- package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +2 -0
- package/dist/admin/src/modules/plugin-settings/services/plugin-settings-service.d.ts +4 -0
- package/dist/server/index.js +665 -38
- package/dist/server/index.mjs +665 -39
- package/dist/server/src/bootstrap.d.ts +1 -1
- package/dist/server/src/constants/permissions.d.ts +38 -0
- package/dist/server/src/controllers/debug-bundle-controller.d.ts +7 -0
- package/dist/server/src/controllers/index.d.ts +6 -0
- package/dist/server/src/controllers/plugin-settings-controller.d.ts +1 -0
- package/dist/server/src/core/index.d.ts +5 -1
- package/dist/server/src/db/model/activity-logs.d.ts +10 -0
- package/dist/server/src/index.d.ts +64 -8
- package/dist/server/src/routes/activity-logs-routes.d.ts +20 -3
- package/dist/server/src/routes/debug-bundle-routes.d.ts +14 -0
- package/dist/server/src/routes/entry-exclusion-routes.d.ts +20 -3
- package/dist/server/src/routes/index.d.ts +52 -6
- package/dist/server/src/routes/localazy-auth-routes.d.ts +6 -1
- package/dist/server/src/routes/localazy-project-routes.d.ts +20 -3
- package/dist/server/src/routes/localazy-transfer-routes.d.ts +6 -1
- package/dist/server/src/routes/localazy-user-routes.d.ts +20 -3
- package/dist/server/src/routes/plugin-settings-routes.d.ts +20 -3
- package/dist/server/src/routes/strapi-routes.d.ts +20 -3
- package/dist/server/src/services/activity-logs-service.d.ts +3 -1
- package/dist/server/src/services/index.d.ts +5 -1
- package/dist/server/src/services/localazy-transfer-download-service.d.ts +2 -1
- package/dist/server/src/services/plugin-settings-service.d.ts +4 -0
- package/dist/server/src/utils/build-debug-bundle.d.ts +68 -0
- package/dist/server/src/utils/sanitize-debug-bundle.d.ts +25 -0
- package/package.json +2 -1
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { useLocation } from "react-router-dom";
|
|
4
|
-
import { T as Typography, a as Toggle } from "./index-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
4
|
+
import { T as Typography, a as Toggle } from "./index-shryj0jT.mjs";
|
|
5
|
+
import { useRBAC } from "@strapi/strapi/admin";
|
|
6
|
+
import EntryExclusionService from "./entry-exclusion-service-CF_yNCly.mjs";
|
|
7
|
+
import { P as PERMISSIONS } from "./index-DP2ugzc_.mjs";
|
|
8
|
+
import "./i18n-76ox2llT.mjs";
|
|
7
9
|
import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
|
|
8
10
|
const LocalazyPanel = () => {
|
|
9
11
|
const { t } = useTranslation();
|
|
12
|
+
const { allowedActions } = useRBAC([...PERMISSIONS.READ, ...PERMISSIONS.TRANSFER]);
|
|
10
13
|
const location = useLocation();
|
|
11
14
|
const [isExcluded, setIsExcluded] = useState(false);
|
|
12
15
|
const [isLoading, setIsLoading] = useState(true);
|
|
@@ -29,7 +32,7 @@ const LocalazyPanel = () => {
|
|
|
29
32
|
}, [location.pathname]);
|
|
30
33
|
useEffect(() => {
|
|
31
34
|
const loadExclusionState = async () => {
|
|
32
|
-
if (!contentType || !documentId) {
|
|
35
|
+
if (!contentType || !documentId || !allowedActions.canRead) {
|
|
33
36
|
setIsLoading(false);
|
|
34
37
|
return;
|
|
35
38
|
}
|
|
@@ -45,7 +48,10 @@ const LocalazyPanel = () => {
|
|
|
45
48
|
}
|
|
46
49
|
};
|
|
47
50
|
void loadExclusionState();
|
|
48
|
-
}, [contentType, documentId]);
|
|
51
|
+
}, [contentType, documentId, allowedActions.canRead]);
|
|
52
|
+
if (!allowedActions.canRead) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
49
55
|
const handleToggleChange = async (event) => {
|
|
50
56
|
const { checked } = event.target;
|
|
51
57
|
const value = checked;
|
|
@@ -71,7 +77,7 @@ const LocalazyPanel = () => {
|
|
|
71
77
|
checked: isExcluded,
|
|
72
78
|
onLabel: "True",
|
|
73
79
|
offLabel: "False",
|
|
74
|
-
disabled: isLoading || !contentType || !documentId,
|
|
80
|
+
disabled: isLoading || !contentType || !documentId || !allowedActions.canTransfer,
|
|
75
81
|
onChange: handleToggleChange
|
|
76
82
|
}
|
|
77
83
|
)
|
|
@@ -3,12 +3,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const reactRouterDom = require("react-router-dom");
|
|
6
|
-
const index = require("./index-
|
|
7
|
-
const
|
|
8
|
-
require("./
|
|
6
|
+
const index$1 = require("./index-CTkxoioB.js");
|
|
7
|
+
const admin = require("@strapi/strapi/admin");
|
|
8
|
+
const entryExclusionService = require("./entry-exclusion-service-CH3ZoJQN.js");
|
|
9
|
+
const index = require("./index-CEGaWWh3.js");
|
|
10
|
+
require("./i18n-C5ucROBh.js");
|
|
9
11
|
const useTranslation = require("./useTranslation-BdIl-aLe.js");
|
|
10
12
|
const LocalazyPanel = () => {
|
|
11
13
|
const { t } = useTranslation.useTranslation();
|
|
14
|
+
const { allowedActions } = admin.useRBAC([...index.PERMISSIONS.READ, ...index.PERMISSIONS.TRANSFER]);
|
|
12
15
|
const location = reactRouterDom.useLocation();
|
|
13
16
|
const [isExcluded, setIsExcluded] = React.useState(false);
|
|
14
17
|
const [isLoading, setIsLoading] = React.useState(true);
|
|
@@ -31,7 +34,7 @@ const LocalazyPanel = () => {
|
|
|
31
34
|
}, [location.pathname]);
|
|
32
35
|
React.useEffect(() => {
|
|
33
36
|
const loadExclusionState = async () => {
|
|
34
|
-
if (!contentType || !documentId) {
|
|
37
|
+
if (!contentType || !documentId || !allowedActions.canRead) {
|
|
35
38
|
setIsLoading(false);
|
|
36
39
|
return;
|
|
37
40
|
}
|
|
@@ -47,7 +50,10 @@ const LocalazyPanel = () => {
|
|
|
47
50
|
}
|
|
48
51
|
};
|
|
49
52
|
void loadExclusionState();
|
|
50
|
-
}, [contentType, documentId]);
|
|
53
|
+
}, [contentType, documentId, allowedActions.canRead]);
|
|
54
|
+
if (!allowedActions.canRead) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
51
57
|
const handleToggleChange = async (event) => {
|
|
52
58
|
const { checked } = event.target;
|
|
53
59
|
const value = checked;
|
|
@@ -66,14 +72,14 @@ const LocalazyPanel = () => {
|
|
|
66
72
|
return {
|
|
67
73
|
title: "Localazy",
|
|
68
74
|
content: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
69
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: "8px" }, children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { children: t("plugin_settings.exclude_from_translation") }) }),
|
|
75
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: "8px" }, children: /* @__PURE__ */ jsxRuntime.jsx(index$1.Typography, { children: t("plugin_settings.exclude_from_translation") }) }),
|
|
70
76
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
71
|
-
index.Toggle,
|
|
77
|
+
index$1.Toggle,
|
|
72
78
|
{
|
|
73
79
|
checked: isExcluded,
|
|
74
80
|
onLabel: "True",
|
|
75
81
|
offLabel: "False",
|
|
76
|
-
disabled: isLoading || !contentType || !documentId,
|
|
82
|
+
disabled: isLoading || !contentType || !documentId || !allowedActions.canTransfer,
|
|
77
83
|
onChange: handleToggleChange
|
|
78
84
|
}
|
|
79
85
|
)
|
package/dist/_chunks/{LocalazyStatusColumn-R5n6q_cx.mjs → LocalazyStatusColumn-C_ZCd_s7.mjs}
RENAMED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { useTheme } from "styled-components";
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
4
|
+
import { useRBAC } from "@strapi/strapi/admin";
|
|
5
|
+
import EntryExclusionService from "./entry-exclusion-service-CF_yNCly.mjs";
|
|
6
|
+
import { P as PERMISSIONS } from "./index-DP2ugzc_.mjs";
|
|
7
|
+
import "./i18n-76ox2llT.mjs";
|
|
6
8
|
import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
|
|
7
9
|
const LocalazyStatusColumn = ({ data, model }) => {
|
|
8
10
|
const { t } = useTranslation();
|
|
9
11
|
const theme = useTheme();
|
|
12
|
+
const { allowedActions } = useRBAC(PERMISSIONS.READ);
|
|
10
13
|
const [isExcluded, setIsExcluded] = useState(null);
|
|
11
14
|
const [isLoading, setIsLoading] = useState(true);
|
|
12
15
|
useEffect(() => {
|
|
13
16
|
const checkStatus = async () => {
|
|
14
|
-
if (!data?.documentId || !model) {
|
|
17
|
+
if (!data?.documentId || !model || !allowedActions.canRead) {
|
|
15
18
|
setIsLoading(false);
|
|
16
19
|
return;
|
|
17
20
|
}
|
|
@@ -26,7 +29,10 @@ const LocalazyStatusColumn = ({ data, model }) => {
|
|
|
26
29
|
}
|
|
27
30
|
};
|
|
28
31
|
void checkStatus();
|
|
29
|
-
}, [data?.documentId, model]);
|
|
32
|
+
}, [data?.documentId, model, allowedActions.canRead]);
|
|
33
|
+
if (!allowedActions.canRead) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
30
36
|
if (isLoading) {
|
|
31
37
|
return /* @__PURE__ */ jsx("span", { style: { color: theme.colors.neutral600, fontSize: "12px" }, children: "..." });
|
|
32
38
|
}
|
|
@@ -3,17 +3,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const styled = require("styled-components");
|
|
6
|
-
const
|
|
7
|
-
require("./
|
|
6
|
+
const admin = require("@strapi/strapi/admin");
|
|
7
|
+
const entryExclusionService = require("./entry-exclusion-service-CH3ZoJQN.js");
|
|
8
|
+
const index = require("./index-CEGaWWh3.js");
|
|
9
|
+
require("./i18n-C5ucROBh.js");
|
|
8
10
|
const useTranslation = require("./useTranslation-BdIl-aLe.js");
|
|
9
11
|
const LocalazyStatusColumn = ({ data, model }) => {
|
|
10
12
|
const { t } = useTranslation.useTranslation();
|
|
11
13
|
const theme = styled.useTheme();
|
|
14
|
+
const { allowedActions } = admin.useRBAC(index.PERMISSIONS.READ);
|
|
12
15
|
const [isExcluded, setIsExcluded] = React.useState(null);
|
|
13
16
|
const [isLoading, setIsLoading] = React.useState(true);
|
|
14
17
|
React.useEffect(() => {
|
|
15
18
|
const checkStatus = async () => {
|
|
16
|
-
if (!data?.documentId || !model) {
|
|
19
|
+
if (!data?.documentId || !model || !allowedActions.canRead) {
|
|
17
20
|
setIsLoading(false);
|
|
18
21
|
return;
|
|
19
22
|
}
|
|
@@ -28,7 +31,10 @@ const LocalazyStatusColumn = ({ data, model }) => {
|
|
|
28
31
|
}
|
|
29
32
|
};
|
|
30
33
|
void checkStatus();
|
|
31
|
-
}, [data?.documentId, model]);
|
|
34
|
+
}, [data?.documentId, model, allowedActions.canRead]);
|
|
35
|
+
if (!allowedActions.canRead) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
32
38
|
if (isLoading) {
|
|
33
39
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: theme.colors.neutral600, fontSize: "12px" }, children: "..." });
|
|
34
40
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const FetchIdentity = require("./FetchIdentity-
|
|
2
|
+
const FetchIdentity = require("./FetchIdentity-CcEjakiz.js");
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const index$1 = require("./index-
|
|
5
|
-
const index = require("./index-
|
|
4
|
+
const index$1 = require("./index-CEGaWWh3.js");
|
|
5
|
+
const index = require("./index-CTkxoioB.js");
|
|
6
6
|
const admin = require("@strapi/strapi/admin");
|
|
7
|
-
require("./i18n-
|
|
7
|
+
require("./i18n-C5ucROBh.js");
|
|
8
8
|
const useTranslation = require("./useTranslation-BdIl-aLe.js");
|
|
9
9
|
function arraySome(array, predicate) {
|
|
10
10
|
var index2 = -1, length = array == null ? 0 : array.length;
|
|
@@ -208,6 +208,32 @@ function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
|
208
208
|
function isEqual(value, other) {
|
|
209
209
|
return baseIsEqual(value, other);
|
|
210
210
|
}
|
|
211
|
+
function baseSet(object, path, value, customizer) {
|
|
212
|
+
if (!FetchIdentity.isObject(object)) {
|
|
213
|
+
return object;
|
|
214
|
+
}
|
|
215
|
+
path = FetchIdentity.castPath(path, object);
|
|
216
|
+
var index2 = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
217
|
+
while (nested != null && ++index2 < length) {
|
|
218
|
+
var key = FetchIdentity.toKey(path[index2]), newValue = value;
|
|
219
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
220
|
+
return object;
|
|
221
|
+
}
|
|
222
|
+
if (index2 != lastIndex) {
|
|
223
|
+
var objValue = nested[key];
|
|
224
|
+
newValue = void 0;
|
|
225
|
+
if (newValue === void 0) {
|
|
226
|
+
newValue = FetchIdentity.isObject(objValue) ? objValue : FetchIdentity.isIndex(path[index2 + 1]) ? [] : {};
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
FetchIdentity.assignValue(nested, key, newValue);
|
|
230
|
+
nested = nested[key];
|
|
231
|
+
}
|
|
232
|
+
return object;
|
|
233
|
+
}
|
|
234
|
+
function set(object, path, value) {
|
|
235
|
+
return object == null ? object : baseSet(object, path, value);
|
|
236
|
+
}
|
|
211
237
|
const RequireLocalazyAuth = ({ children }) => {
|
|
212
238
|
const { isLoggedIn, isFetchingIdentity } = FetchIdentity.useLocalazyIdentity();
|
|
213
239
|
const { t } = useTranslation.useTranslation();
|
|
@@ -231,3 +257,4 @@ const RequireLocalazyAuth = ({ children }) => {
|
|
|
231
257
|
};
|
|
232
258
|
exports.RequireLocalazyAuth = RequireLocalazyAuth;
|
|
233
259
|
exports.isEqual = isEqual;
|
|
260
|
+
exports.set = set;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S as SetCache,
|
|
1
|
+
import { S as SetCache, b as cacheHas, d as Symbol$1, e as eq, U as Uint8Array, s as setToArray, f as getAllKeys, h as getTag, i as isBuffer, j as Stack, k as isTypedArray, l as isArray, m as isObjectLike, n as isObject, o as castPath, t as toKey, p as isIndex, q as assignValue, u as useLocalazyIdentity } from "./FetchIdentity-Bm7bc5bS.mjs";
|
|
2
2
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { B as Box, T as Typography } from "./index-
|
|
3
|
+
import { a as PLUGIN_ID } from "./index-DP2ugzc_.mjs";
|
|
4
|
+
import { B as Box, T as Typography } from "./index-shryj0jT.mjs";
|
|
5
5
|
import { Layouts } from "@strapi/strapi/admin";
|
|
6
|
-
import "./i18n-
|
|
6
|
+
import "./i18n-76ox2llT.mjs";
|
|
7
7
|
import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
|
|
8
8
|
function arraySome(array, predicate) {
|
|
9
9
|
var index = -1, length = array == null ? 0 : array.length;
|
|
@@ -207,6 +207,32 @@ function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
|
207
207
|
function isEqual(value, other) {
|
|
208
208
|
return baseIsEqual(value, other);
|
|
209
209
|
}
|
|
210
|
+
function baseSet(object, path, value, customizer) {
|
|
211
|
+
if (!isObject(object)) {
|
|
212
|
+
return object;
|
|
213
|
+
}
|
|
214
|
+
path = castPath(path, object);
|
|
215
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
216
|
+
while (nested != null && ++index < length) {
|
|
217
|
+
var key = toKey(path[index]), newValue = value;
|
|
218
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
219
|
+
return object;
|
|
220
|
+
}
|
|
221
|
+
if (index != lastIndex) {
|
|
222
|
+
var objValue = nested[key];
|
|
223
|
+
newValue = void 0;
|
|
224
|
+
if (newValue === void 0) {
|
|
225
|
+
newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
assignValue(nested, key, newValue);
|
|
229
|
+
nested = nested[key];
|
|
230
|
+
}
|
|
231
|
+
return object;
|
|
232
|
+
}
|
|
233
|
+
function set(object, path, value) {
|
|
234
|
+
return object == null ? object : baseSet(object, path, value);
|
|
235
|
+
}
|
|
210
236
|
const RequireLocalazyAuth = ({ children }) => {
|
|
211
237
|
const { isLoggedIn, isFetchingIdentity } = useLocalazyIdentity();
|
|
212
238
|
const { t } = useTranslation();
|
|
@@ -230,5 +256,6 @@ const RequireLocalazyAuth = ({ children }) => {
|
|
|
230
256
|
};
|
|
231
257
|
export {
|
|
232
258
|
RequireLocalazyAuth as R,
|
|
233
|
-
isEqual as i
|
|
259
|
+
isEqual as i,
|
|
260
|
+
set as s
|
|
234
261
|
};
|
package/dist/_chunks/{entry-exclusion-service-DxqTlZFR.mjs → entry-exclusion-service-CF_yNCly.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createStrapiApiAxiosInstance } from "./strapi-api-base-
|
|
1
|
+
import { c as createStrapiApiAxiosInstance } from "./strapi-api-base-IiMEtDoH.mjs";
|
|
2
2
|
const BASE_PATH = "/entry-exclusion";
|
|
3
3
|
const axiosInstance = createStrapiApiAxiosInstance();
|
|
4
4
|
class EntryExclusionService {
|
package/dist/_chunks/{entry-exclusion-service-CggmAKxq.js → entry-exclusion-service-CH3ZoJQN.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const strapiApiBase = require("./strapi-api-base-
|
|
3
|
+
const strapiApiBase = require("./strapi-api-base-CCUuu7EY.js");
|
|
4
4
|
const BASE_PATH = "/entry-exclusion";
|
|
5
5
|
const axiosInstance = strapiApiBase.createStrapiApiAxiosInstance();
|
|
6
6
|
class EntryExclusionService {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as createStrapiApiAxiosInstance } from "./strapi-api-base-
|
|
1
|
+
import { o as castPath, t as toKey, x as Set, s as setToArray, S as SetCache, b as cacheHas, P as PluginSettingsService } from "./FetchIdentity-Bm7bc5bS.mjs";
|
|
2
|
+
import { c as createStrapiApiAxiosInstance } from "./strapi-api-base-IiMEtDoH.mjs";
|
|
3
3
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-DWwsNxpa.mjs";
|
|
4
4
|
function baseGet(object, path) {
|
|
5
5
|
path = castPath(path, object);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const FetchIdentity = require("./FetchIdentity-
|
|
3
|
-
const strapiApiBase = require("./strapi-api-base-
|
|
2
|
+
const FetchIdentity = require("./FetchIdentity-CcEjakiz.js");
|
|
3
|
+
const strapiApiBase = require("./strapi-api-base-CCUuu7EY.js");
|
|
4
4
|
const _commonjsHelpers = require("./_commonjsHelpers-Bc2YnDe1.js");
|
|
5
5
|
function baseGet(object, path) {
|
|
6
6
|
path = FetchIdentity.castPath(path, object);
|
|
@@ -2238,7 +2238,8 @@ const en_login = {
|
|
|
2238
2238
|
login_and_start_translating_your_project: "Login and start translating your project with powerful Localazy tools.",
|
|
2239
2239
|
you_have_to_own_account_for_the_plugin_to_work_properly: "You have to own a Localazy account for the plugin to work properly.",
|
|
2240
2240
|
read_the_documentation: "Read the documentation",
|
|
2241
|
-
logout_from_localazy: "Disconnect from Localazy"
|
|
2241
|
+
logout_from_localazy: "Disconnect from Localazy",
|
|
2242
|
+
requires_settings_update_permission: 'Requires Localazy "settings.update" permission. Ask an admin to grant it under Settings → Roles → Plugins → Localazy.'
|
|
2242
2243
|
};
|
|
2243
2244
|
const en_overview = {
|
|
2244
2245
|
description: "Overview of the connected Localazy account and project.",
|
|
@@ -2323,6 +2324,8 @@ const en_plugin_settings = {
|
|
|
2323
2324
|
webhook_author: "Webhook actions author",
|
|
2324
2325
|
webhook_author_info: "Select the author signed under the webhook actions (required by Strapi for certain actions, e.g. creating a locale).",
|
|
2325
2326
|
webhook_author_placeholder: "Select webhook actions author",
|
|
2327
|
+
webhook_author_permission_required: "You need the Strapi “Users and Roles → Users → Read” permission (admin::users.read) to view and pick a webhook author.",
|
|
2328
|
+
webhook_author_unknown_user: "User #{{id}}",
|
|
2326
2329
|
webhook_languages: "Allowed webhook languages",
|
|
2327
2330
|
webhook_languages_info: "Select the languages from Localazy. Translations of selected languages would be downloaded. If no language is selected, all translations will be downloaded.",
|
|
2328
2331
|
webhook_languages_placeholder: "Download all languages",
|
|
@@ -2411,7 +2414,11 @@ const en_activity_logs = {
|
|
|
2411
2414
|
clear: "Clear",
|
|
2412
2415
|
date_from: "From",
|
|
2413
2416
|
date_to: "To",
|
|
2414
|
-
retention_info: "Activity logs are retained for the past year. Older entries are automatically removed."
|
|
2417
|
+
retention_info: "Activity logs are retained for the past year. Older entries are automatically removed.",
|
|
2418
|
+
download_bundle: "Download troubleshooting bundle",
|
|
2419
|
+
download_bundle_warning: "Bundle includes entry content — review before sharing.",
|
|
2420
|
+
download_bundle_success: "Troubleshooting bundle downloaded.",
|
|
2421
|
+
download_bundle_error: "Failed to build the troubleshooting bundle."
|
|
2415
2422
|
};
|
|
2416
2423
|
const initI18nParams = () => {
|
|
2417
2424
|
return {
|
|
@@ -2240,7 +2240,8 @@ const en_login = {
|
|
|
2240
2240
|
login_and_start_translating_your_project: "Login and start translating your project with powerful Localazy tools.",
|
|
2241
2241
|
you_have_to_own_account_for_the_plugin_to_work_properly: "You have to own a Localazy account for the plugin to work properly.",
|
|
2242
2242
|
read_the_documentation: "Read the documentation",
|
|
2243
|
-
logout_from_localazy: "Disconnect from Localazy"
|
|
2243
|
+
logout_from_localazy: "Disconnect from Localazy",
|
|
2244
|
+
requires_settings_update_permission: 'Requires Localazy "settings.update" permission. Ask an admin to grant it under Settings → Roles → Plugins → Localazy.'
|
|
2244
2245
|
};
|
|
2245
2246
|
const en_overview = {
|
|
2246
2247
|
description: "Overview of the connected Localazy account and project.",
|
|
@@ -2325,6 +2326,8 @@ const en_plugin_settings = {
|
|
|
2325
2326
|
webhook_author: "Webhook actions author",
|
|
2326
2327
|
webhook_author_info: "Select the author signed under the webhook actions (required by Strapi for certain actions, e.g. creating a locale).",
|
|
2327
2328
|
webhook_author_placeholder: "Select webhook actions author",
|
|
2329
|
+
webhook_author_permission_required: "You need the Strapi “Users and Roles → Users → Read” permission (admin::users.read) to view and pick a webhook author.",
|
|
2330
|
+
webhook_author_unknown_user: "User #{{id}}",
|
|
2328
2331
|
webhook_languages: "Allowed webhook languages",
|
|
2329
2332
|
webhook_languages_info: "Select the languages from Localazy. Translations of selected languages would be downloaded. If no language is selected, all translations will be downloaded.",
|
|
2330
2333
|
webhook_languages_placeholder: "Download all languages",
|
|
@@ -2413,7 +2416,11 @@ const en_activity_logs = {
|
|
|
2413
2416
|
clear: "Clear",
|
|
2414
2417
|
date_from: "From",
|
|
2415
2418
|
date_to: "To",
|
|
2416
|
-
retention_info: "Activity logs are retained for the past year. Older entries are automatically removed."
|
|
2419
|
+
retention_info: "Activity logs are retained for the past year. Older entries are automatically removed.",
|
|
2420
|
+
download_bundle: "Download troubleshooting bundle",
|
|
2421
|
+
download_bundle_warning: "Bundle includes entry content — review before sharing.",
|
|
2422
|
+
download_bundle_success: "Troubleshooting bundle downloaded.",
|
|
2423
|
+
download_bundle_error: "Failed to build the troubleshooting bundle."
|
|
2417
2424
|
};
|
|
2418
2425
|
const initI18nParams = () => {
|
|
2419
2426
|
return {
|
|
@@ -61,6 +61,18 @@ const Localazy = () => {
|
|
|
61
61
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.2937 13.5315L21.0354 4.63345C21.2724 4.07548 20.8619 3.45832 20.2566 3.46255L17.2267 3.46255L16.4794 5.23793C16.4794 5.24638 16.4752 5.25484 16.4709 5.26329L16.4709 5.26329L16.3482 5.55074C16.2297 5.82973 16.4371 6.1383 16.7376 6.1383H16.8069C17.1074 6.1383 17.3148 6.44688 17.1963 6.72587L15.2408 11.3757C15.1773 11.5321 15.0207 11.6335 14.8514 11.6335H13.7902L12.9112 13.7217C12.7927 14.0007 13.0001 14.3093 13.3006 14.3093H16.1212C16.6334 14.3093 17.0947 14.0007 17.2937 13.5315Z" })
|
|
62
62
|
] });
|
|
63
63
|
};
|
|
64
|
+
const PERMISSION_UIDS = {
|
|
65
|
+
READ: `plugin::${PLUGIN_ID}.read`,
|
|
66
|
+
TRANSFER: `plugin::${PLUGIN_ID}.transfer`,
|
|
67
|
+
SETTINGS_READ: `plugin::${PLUGIN_ID}.settings.read`,
|
|
68
|
+
SETTINGS_UPDATE: `plugin::${PLUGIN_ID}.settings.update`
|
|
69
|
+
};
|
|
70
|
+
const PERMISSIONS = {
|
|
71
|
+
READ: [{ action: PERMISSION_UIDS.READ, subject: null }],
|
|
72
|
+
TRANSFER: [{ action: PERMISSION_UIDS.TRANSFER, subject: null }],
|
|
73
|
+
SETTINGS_READ: [{ action: PERMISSION_UIDS.SETTINGS_READ, subject: null }],
|
|
74
|
+
SETTINGS_UPDATE: [{ action: PERMISSION_UIDS.SETTINGS_UPDATE, subject: null }]
|
|
75
|
+
};
|
|
64
76
|
const index = {
|
|
65
77
|
register(app) {
|
|
66
78
|
addMenuLink(app);
|
|
@@ -83,13 +95,13 @@ const index = {
|
|
|
83
95
|
try {
|
|
84
96
|
const contentManagerPlugin = app.getPlugin("content-manager");
|
|
85
97
|
if (contentManagerPlugin?.apis?.addEditViewSidePanel) {
|
|
86
|
-
const { default: LocalazyPanel } = await Promise.resolve().then(() => require("./LocalazyPanel-
|
|
98
|
+
const { default: LocalazyPanel } = await Promise.resolve().then(() => require("./LocalazyPanel-D2LQpqii.js"));
|
|
87
99
|
const apis = contentManagerPlugin.apis;
|
|
88
100
|
apis.addEditViewSidePanel([LocalazyPanel]);
|
|
89
101
|
} else {
|
|
90
102
|
console.warn('Localazy Plugin: Content Manager "addEditViewSidePanel" API not available');
|
|
91
103
|
}
|
|
92
|
-
const { default: LocalazyStatusColumn } = await Promise.resolve().then(() => require("./LocalazyStatusColumn-
|
|
104
|
+
const { default: LocalazyStatusColumn } = await Promise.resolve().then(() => require("./LocalazyStatusColumn-Dy6N4_X6.js"));
|
|
93
105
|
app.registerHook("Admin/CM/pages/ListView/inject-column-in-table", (params) => {
|
|
94
106
|
try {
|
|
95
107
|
console.log("Localazy: Hook called with params:", params);
|
|
@@ -121,13 +133,17 @@ const index = {
|
|
|
121
133
|
}
|
|
122
134
|
});
|
|
123
135
|
if (contentManagerPlugin?.apis?.addBulkAction) {
|
|
124
|
-
const { useNotification } = await import("@strapi/strapi/admin");
|
|
125
|
-
await Promise.resolve().then(() => require("./i18n-
|
|
136
|
+
const { useNotification, useRBAC } = await import("@strapi/strapi/admin");
|
|
137
|
+
await Promise.resolve().then(() => require("./i18n-C5ucROBh.js"));
|
|
126
138
|
const { useTranslation } = await Promise.resolve().then(() => require("./index-1he9s_bs.js"));
|
|
127
139
|
const ExcludeFromTranslationAction = (props) => {
|
|
128
140
|
const { documents, model } = props;
|
|
129
141
|
const { toggleNotification } = useNotification();
|
|
130
142
|
const { t } = useTranslation();
|
|
143
|
+
const { allowedActions } = useRBAC(PERMISSIONS.TRANSFER);
|
|
144
|
+
if (!allowedActions.canTransfer) {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
131
147
|
return {
|
|
132
148
|
label: t("plugin_settings.bulk_action_exclude_from_translation"),
|
|
133
149
|
variant: "secondary",
|
|
@@ -137,7 +153,7 @@ const index = {
|
|
|
137
153
|
type: "info",
|
|
138
154
|
message: t("plugin_settings.bulk_action_updating_entries")
|
|
139
155
|
});
|
|
140
|
-
const { default: EntryExclusionService } = await Promise.resolve().then(() => require("./entry-exclusion-service-
|
|
156
|
+
const { default: EntryExclusionService } = await Promise.resolve().then(() => require("./entry-exclusion-service-CH3ZoJQN.js"));
|
|
141
157
|
const documentIds = documents.map((doc) => doc.documentId);
|
|
142
158
|
await EntryExclusionService.setMultipleEntriesExclusion(model, documentIds, true);
|
|
143
159
|
toggleNotification({
|
|
@@ -159,6 +175,10 @@ const index = {
|
|
|
159
175
|
const IncludeToTranslationAction = ({ documents, model }) => {
|
|
160
176
|
const { toggleNotification } = useNotification();
|
|
161
177
|
const { t } = useTranslation();
|
|
178
|
+
const { allowedActions } = useRBAC(PERMISSIONS.TRANSFER);
|
|
179
|
+
if (!allowedActions.canTransfer) {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
162
182
|
return {
|
|
163
183
|
label: t("plugin_settings.bulk_action_include_to_translation"),
|
|
164
184
|
variant: "secondary",
|
|
@@ -168,7 +188,7 @@ const index = {
|
|
|
168
188
|
type: "info",
|
|
169
189
|
message: t("plugin_settings.bulk_action_updating_entries")
|
|
170
190
|
});
|
|
171
|
-
const { default: EntryExclusionService } = await Promise.resolve().then(() => require("./entry-exclusion-service-
|
|
191
|
+
const { default: EntryExclusionService } = await Promise.resolve().then(() => require("./entry-exclusion-service-CH3ZoJQN.js"));
|
|
172
192
|
const documentIds = documents.map((doc) => doc.documentId);
|
|
173
193
|
await EntryExclusionService.setMultipleEntriesExclusion(model, documentIds, false);
|
|
174
194
|
toggleNotification({
|
|
@@ -204,7 +224,8 @@ const addMenuLink = (app) => {
|
|
|
204
224
|
id: `${PLUGIN_ID}.name`,
|
|
205
225
|
defaultMessage: "Localazy"
|
|
206
226
|
},
|
|
207
|
-
Component: () => Promise.resolve().then(() => require("./LocalazyApp-
|
|
227
|
+
Component: () => Promise.resolve().then(() => require("./LocalazyApp-jPO7Yr1S.js")),
|
|
228
|
+
permissions: PERMISSIONS.READ
|
|
208
229
|
});
|
|
209
230
|
};
|
|
210
231
|
const addSettingsSection = (app) => {
|
|
@@ -225,8 +246,8 @@ const addSettingsSection = (app) => {
|
|
|
225
246
|
defaultMessage: "Localazy Settings"
|
|
226
247
|
},
|
|
227
248
|
to: `${PLUGIN_ID}/global-settings`,
|
|
228
|
-
Component: () => Promise.resolve().then(() => require("./LocalazyGlobalSettings-
|
|
229
|
-
permissions:
|
|
249
|
+
Component: () => Promise.resolve().then(() => require("./LocalazyGlobalSettings-D76it6rn.js")),
|
|
250
|
+
permissions: PERMISSIONS.SETTINGS_READ
|
|
230
251
|
},
|
|
231
252
|
// Content Transfer Setup
|
|
232
253
|
{
|
|
@@ -236,8 +257,8 @@ const addSettingsSection = (app) => {
|
|
|
236
257
|
defaultMessage: "Content Transfer Setup"
|
|
237
258
|
},
|
|
238
259
|
to: `${PLUGIN_ID}/content-transfer-setup`,
|
|
239
|
-
Component: () => Promise.resolve().then(() => require("./LocalazyContentTransferSetup-
|
|
240
|
-
permissions:
|
|
260
|
+
Component: () => Promise.resolve().then(() => require("./LocalazyContentTransferSetup-DZh4ZdSi.js")),
|
|
261
|
+
permissions: PERMISSIONS.SETTINGS_READ
|
|
241
262
|
}
|
|
242
263
|
]
|
|
243
264
|
);
|
|
@@ -250,5 +271,6 @@ const addPlugin = (app) => {
|
|
|
250
271
|
name: PLUGIN_ID
|
|
251
272
|
});
|
|
252
273
|
};
|
|
274
|
+
exports.PERMISSIONS = PERMISSIONS;
|
|
253
275
|
exports.PLUGIN_ID = PLUGIN_ID;
|
|
254
276
|
exports.index = index;
|
|
@@ -51141,6 +51141,7 @@ exports.SubNavSections = SubNavSections;
|
|
|
51141
51141
|
exports.SwitchImpl = SwitchImpl;
|
|
51142
51142
|
exports.Tabs = Tabs;
|
|
51143
51143
|
exports.Toggle = Toggle;
|
|
51144
|
+
exports.TooltipImpl = TooltipImpl;
|
|
51144
51145
|
exports.Typography = Typography;
|
|
51145
51146
|
exports.darkTheme = darkTheme;
|
|
51146
51147
|
exports.lightTheme = lightTheme;
|
|
@@ -36,6 +36,18 @@ const Localazy = () => {
|
|
|
36
36
|
/* @__PURE__ */ jsx("path", { d: "M17.2937 13.5315L21.0354 4.63345C21.2724 4.07548 20.8619 3.45832 20.2566 3.46255L17.2267 3.46255L16.4794 5.23793C16.4794 5.24638 16.4752 5.25484 16.4709 5.26329L16.4709 5.26329L16.3482 5.55074C16.2297 5.82973 16.4371 6.1383 16.7376 6.1383H16.8069C17.1074 6.1383 17.3148 6.44688 17.1963 6.72587L15.2408 11.3757C15.1773 11.5321 15.0207 11.6335 14.8514 11.6335H13.7902L12.9112 13.7217C12.7927 14.0007 13.0001 14.3093 13.3006 14.3093H16.1212C16.6334 14.3093 17.0947 14.0007 17.2937 13.5315Z" })
|
|
37
37
|
] });
|
|
38
38
|
};
|
|
39
|
+
const PERMISSION_UIDS = {
|
|
40
|
+
READ: `plugin::${PLUGIN_ID}.read`,
|
|
41
|
+
TRANSFER: `plugin::${PLUGIN_ID}.transfer`,
|
|
42
|
+
SETTINGS_READ: `plugin::${PLUGIN_ID}.settings.read`,
|
|
43
|
+
SETTINGS_UPDATE: `plugin::${PLUGIN_ID}.settings.update`
|
|
44
|
+
};
|
|
45
|
+
const PERMISSIONS = {
|
|
46
|
+
READ: [{ action: PERMISSION_UIDS.READ, subject: null }],
|
|
47
|
+
TRANSFER: [{ action: PERMISSION_UIDS.TRANSFER, subject: null }],
|
|
48
|
+
SETTINGS_READ: [{ action: PERMISSION_UIDS.SETTINGS_READ, subject: null }],
|
|
49
|
+
SETTINGS_UPDATE: [{ action: PERMISSION_UIDS.SETTINGS_UPDATE, subject: null }]
|
|
50
|
+
};
|
|
39
51
|
const index = {
|
|
40
52
|
register(app) {
|
|
41
53
|
addMenuLink(app);
|
|
@@ -58,13 +70,13 @@ const index = {
|
|
|
58
70
|
try {
|
|
59
71
|
const contentManagerPlugin = app.getPlugin("content-manager");
|
|
60
72
|
if (contentManagerPlugin?.apis?.addEditViewSidePanel) {
|
|
61
|
-
const { default: LocalazyPanel } = await import("./LocalazyPanel-
|
|
73
|
+
const { default: LocalazyPanel } = await import("./LocalazyPanel-C_Z4W49T.mjs");
|
|
62
74
|
const apis = contentManagerPlugin.apis;
|
|
63
75
|
apis.addEditViewSidePanel([LocalazyPanel]);
|
|
64
76
|
} else {
|
|
65
77
|
console.warn('Localazy Plugin: Content Manager "addEditViewSidePanel" API not available');
|
|
66
78
|
}
|
|
67
|
-
const { default: LocalazyStatusColumn } = await import("./LocalazyStatusColumn-
|
|
79
|
+
const { default: LocalazyStatusColumn } = await import("./LocalazyStatusColumn-C_ZCd_s7.mjs");
|
|
68
80
|
app.registerHook("Admin/CM/pages/ListView/inject-column-in-table", (params) => {
|
|
69
81
|
try {
|
|
70
82
|
console.log("Localazy: Hook called with params:", params);
|
|
@@ -96,13 +108,17 @@ const index = {
|
|
|
96
108
|
}
|
|
97
109
|
});
|
|
98
110
|
if (contentManagerPlugin?.apis?.addBulkAction) {
|
|
99
|
-
const { useNotification } = await import("@strapi/strapi/admin");
|
|
100
|
-
await import("./i18n-
|
|
111
|
+
const { useNotification, useRBAC } = await import("@strapi/strapi/admin");
|
|
112
|
+
await import("./i18n-76ox2llT.mjs");
|
|
101
113
|
const { useTranslation } = await import("./index-BIbKC7-V.mjs");
|
|
102
114
|
const ExcludeFromTranslationAction = (props) => {
|
|
103
115
|
const { documents, model } = props;
|
|
104
116
|
const { toggleNotification } = useNotification();
|
|
105
117
|
const { t } = useTranslation();
|
|
118
|
+
const { allowedActions } = useRBAC(PERMISSIONS.TRANSFER);
|
|
119
|
+
if (!allowedActions.canTransfer) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
106
122
|
return {
|
|
107
123
|
label: t("plugin_settings.bulk_action_exclude_from_translation"),
|
|
108
124
|
variant: "secondary",
|
|
@@ -112,7 +128,7 @@ const index = {
|
|
|
112
128
|
type: "info",
|
|
113
129
|
message: t("plugin_settings.bulk_action_updating_entries")
|
|
114
130
|
});
|
|
115
|
-
const { default: EntryExclusionService } = await import("./entry-exclusion-service-
|
|
131
|
+
const { default: EntryExclusionService } = await import("./entry-exclusion-service-CF_yNCly.mjs");
|
|
116
132
|
const documentIds = documents.map((doc) => doc.documentId);
|
|
117
133
|
await EntryExclusionService.setMultipleEntriesExclusion(model, documentIds, true);
|
|
118
134
|
toggleNotification({
|
|
@@ -134,6 +150,10 @@ const index = {
|
|
|
134
150
|
const IncludeToTranslationAction = ({ documents, model }) => {
|
|
135
151
|
const { toggleNotification } = useNotification();
|
|
136
152
|
const { t } = useTranslation();
|
|
153
|
+
const { allowedActions } = useRBAC(PERMISSIONS.TRANSFER);
|
|
154
|
+
if (!allowedActions.canTransfer) {
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
137
157
|
return {
|
|
138
158
|
label: t("plugin_settings.bulk_action_include_to_translation"),
|
|
139
159
|
variant: "secondary",
|
|
@@ -143,7 +163,7 @@ const index = {
|
|
|
143
163
|
type: "info",
|
|
144
164
|
message: t("plugin_settings.bulk_action_updating_entries")
|
|
145
165
|
});
|
|
146
|
-
const { default: EntryExclusionService } = await import("./entry-exclusion-service-
|
|
166
|
+
const { default: EntryExclusionService } = await import("./entry-exclusion-service-CF_yNCly.mjs");
|
|
147
167
|
const documentIds = documents.map((doc) => doc.documentId);
|
|
148
168
|
await EntryExclusionService.setMultipleEntriesExclusion(model, documentIds, false);
|
|
149
169
|
toggleNotification({
|
|
@@ -179,7 +199,8 @@ const addMenuLink = (app) => {
|
|
|
179
199
|
id: `${PLUGIN_ID}.name`,
|
|
180
200
|
defaultMessage: "Localazy"
|
|
181
201
|
},
|
|
182
|
-
Component: () => import("./LocalazyApp-
|
|
202
|
+
Component: () => import("./LocalazyApp-C4kbsnQh.mjs"),
|
|
203
|
+
permissions: PERMISSIONS.READ
|
|
183
204
|
});
|
|
184
205
|
};
|
|
185
206
|
const addSettingsSection = (app) => {
|
|
@@ -200,8 +221,8 @@ const addSettingsSection = (app) => {
|
|
|
200
221
|
defaultMessage: "Localazy Settings"
|
|
201
222
|
},
|
|
202
223
|
to: `${PLUGIN_ID}/global-settings`,
|
|
203
|
-
Component: () => import("./LocalazyGlobalSettings-
|
|
204
|
-
permissions:
|
|
224
|
+
Component: () => import("./LocalazyGlobalSettings-DOW5rjLn.mjs"),
|
|
225
|
+
permissions: PERMISSIONS.SETTINGS_READ
|
|
205
226
|
},
|
|
206
227
|
// Content Transfer Setup
|
|
207
228
|
{
|
|
@@ -211,8 +232,8 @@ const addSettingsSection = (app) => {
|
|
|
211
232
|
defaultMessage: "Content Transfer Setup"
|
|
212
233
|
},
|
|
213
234
|
to: `${PLUGIN_ID}/content-transfer-setup`,
|
|
214
|
-
Component: () => import("./LocalazyContentTransferSetup-
|
|
215
|
-
permissions:
|
|
235
|
+
Component: () => import("./LocalazyContentTransferSetup-C1wDD9hA.mjs"),
|
|
236
|
+
permissions: PERMISSIONS.SETTINGS_READ
|
|
216
237
|
}
|
|
217
238
|
]
|
|
218
239
|
);
|
|
@@ -226,6 +247,7 @@ const addPlugin = (app) => {
|
|
|
226
247
|
});
|
|
227
248
|
};
|
|
228
249
|
export {
|
|
229
|
-
|
|
250
|
+
PERMISSIONS as P,
|
|
251
|
+
PLUGIN_ID as a,
|
|
230
252
|
index as i
|
|
231
253
|
};
|