@burtson-labs/bandit-engine 2.0.113 → 2.0.115
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/{chunk-BLC6ZYGQ.mjs → chunk-NZKNHFE4.mjs} +23 -15
- package/dist/chunk-NZKNHFE4.mjs.map +1 -0
- package/dist/index.js +22 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/management/management.js +22 -14
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-BLC6ZYGQ.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -44889,47 +44889,55 @@ var Management = () => {
|
|
|
44889
44889
|
{
|
|
44890
44890
|
label: "Personalities",
|
|
44891
44891
|
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(FaceRetouchingNaturalIcon, {}),
|
|
44892
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44893
|
-
|
|
44892
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44893
|
+
requiresAdmin: true
|
|
44894
44894
|
},
|
|
44895
44895
|
{
|
|
44896
44896
|
label: "Branding",
|
|
44897
44897
|
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BrushIcon, {}),
|
|
44898
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44899
|
-
|
|
44898
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44899
|
+
requiresAdmin: true
|
|
44900
44900
|
},
|
|
44901
44901
|
{
|
|
44902
44902
|
label: "Knowledge",
|
|
44903
44903
|
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(MenuBookIcon, {}),
|
|
44904
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44905
|
-
|
|
44904
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44905
|
+
requiresAdmin: true
|
|
44906
44906
|
},
|
|
44907
44907
|
{
|
|
44908
44908
|
label: "Storage",
|
|
44909
44909
|
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(StorageIcon, {}),
|
|
44910
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44911
|
-
|
|
44910
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44911
|
+
requiresAdmin: true
|
|
44912
44912
|
},
|
|
44913
44913
|
{
|
|
44914
44914
|
label: "Preferences",
|
|
44915
44915
|
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TuneIcon, {}),
|
|
44916
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44917
|
-
|
|
44916
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44917
|
+
requiresAdmin: false
|
|
44918
44918
|
},
|
|
44919
44919
|
{
|
|
44920
44920
|
label: "Provider",
|
|
44921
44921
|
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CloudIcon, {}),
|
|
44922
|
-
requiresFeature: "advancedSearch"
|
|
44923
|
-
|
|
44922
|
+
requiresFeature: "advancedSearch",
|
|
44923
|
+
requiresAdmin: true
|
|
44924
44924
|
},
|
|
44925
44925
|
{
|
|
44926
44926
|
label: "Tools",
|
|
44927
44927
|
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BuildIcon, {}),
|
|
44928
|
-
requiresFeature: "advancedSearch"
|
|
44929
|
-
|
|
44928
|
+
requiresFeature: "advancedSearch",
|
|
44929
|
+
requiresAdmin: true
|
|
44930
44930
|
}
|
|
44931
44931
|
];
|
|
44932
|
+
const platformAdminRoles = /* @__PURE__ */ new Set([
|
|
44933
|
+
"admin",
|
|
44934
|
+
"platform_admin",
|
|
44935
|
+
"super_admin"
|
|
44936
|
+
]);
|
|
44937
|
+
const userRoles = (authenticationService.parseJwtClaims(authenticationService.getToken() ?? "")?.roles ?? []).map((r) => r.toLowerCase());
|
|
44938
|
+
const isWorkspaceAdmin = userRoles.some((r) => platformAdminRoles.has(r));
|
|
44932
44939
|
const navTabs = allNavTabs.filter((tab) => {
|
|
44940
|
+
if (tab.requiresAdmin && !isWorkspaceAdmin) return false;
|
|
44933
44941
|
if (tab.requiresFeature === "limitedAdminDashboard") {
|
|
44934
44942
|
return hasLimitedAdminDashboard() || hasAdminDashboard();
|
|
44935
44943
|
}
|