@opengis/fastify-table 2.3.4 → 2.3.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkPermissions.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/policy/funcs/checkPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAMhC,wBAA8B,gBAAgB,CAAC,GAAG,EAAE,eAAe;;;
|
|
1
|
+
{"version":3,"file":"checkPermissions.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/policy/funcs/checkPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAMhC,wBAA8B,gBAAgB,CAAC,GAAG,EAAE,eAAe;;;UA4DlE"}
|
|
@@ -17,10 +17,7 @@ export default async function checkPermissions(req) {
|
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
19
|
const userPermissions = await getUserPermissions({ uid: user?.uid, userType: user?.user_type }, pg).then((arr) => arr.reduce((acc, curr) => ({ ...acc, [curr.name]: curr.actions }), {}));
|
|
20
|
-
const havePermission =
|
|
21
|
-
permissions?.length &&
|
|
22
|
-
permissions.length ===
|
|
23
|
-
permissions.filter(([key, value]) => userPermissions[key]?.includes(value)).length;
|
|
20
|
+
const havePermission = permissions?.some(([key, value]) => userPermissions?.[key]?.includes(value)) ?? false;
|
|
24
21
|
if (!user?.user_type?.includes?.("admin") && !havePermission) {
|
|
25
22
|
logger.file("policy/permissions", {
|
|
26
23
|
path,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggest.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/controllers/suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAuBpD,wBAAsB,kBAAkB,CAAC,EACvC,KAAK,EACL,QAAQ,EACR,MAAM,EACN,UAAU,EACV,QAAQ,EACR,UAAU,EACV,GAAG,EACH,EAAqB,GACtB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,UAAU,CAAC;CACjB;;;;;UAwFA;AAED,wBAA8B,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"suggest.d.ts","sourceRoot":"","sources":["../../../../../server/routes/table/controllers/suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAuBpD,wBAAsB,kBAAkB,CAAC,EACvC,KAAK,EACL,QAAQ,EACR,MAAM,EACN,UAAU,EACV,QAAQ,EACR,UAAU,EACV,GAAG,EACH,EAAqB,GACtB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,GAAG,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,UAAU,CAAC;CACjB;;;;;UAwFA;AAED,wBAA8B,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,gBAuYzD"}
|
|
@@ -32,7 +32,7 @@ export async function getTableColumnMeta({ table, template, column, selectName,
|
|
|
32
32
|
color: "#B8B8B8",
|
|
33
33
|
icon: null,
|
|
34
34
|
id: "null",
|
|
35
|
-
text: "
|
|
35
|
+
text: "Показати порожні значення",
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
// w/out select
|
|
@@ -284,7 +284,7 @@ export default async function suggest(req, reply) {
|
|
|
284
284
|
const data = dataNew.filter((el) => Object.hasOwn(el, "id") && Object.hasOwn(el, "text"));
|
|
285
285
|
data
|
|
286
286
|
.filter((el) => el.id === null)
|
|
287
|
-
.forEach((el) => Object.assign(el, { id: "null", text: "
|
|
287
|
+
.forEach((el) => Object.assign(el, { id: "null", text: "Показати порожні значення" }));
|
|
288
288
|
// table:column + select
|
|
289
289
|
if (tableName && column) {
|
|
290
290
|
const { name = selectName || column, type = "select" } = getColumnCLS(tableName, column) || {};
|