@burtson-labs/bandit-engine 2.0.113 → 2.0.114
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-H3BUUAHU.mjs} +26 -15
- package/dist/chunk-H3BUUAHU.mjs.map +1 -0
- package/dist/index.js +25 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/management/management.js +25 -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.mjs
CHANGED
|
@@ -44229,47 +44229,58 @@ var Management = () => {
|
|
|
44229
44229
|
{
|
|
44230
44230
|
label: "Personalities",
|
|
44231
44231
|
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FaceRetouchingNaturalIcon, {}),
|
|
44232
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44233
|
-
|
|
44232
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44233
|
+
requiresAdmin: true
|
|
44234
44234
|
},
|
|
44235
44235
|
{
|
|
44236
44236
|
label: "Branding",
|
|
44237
44237
|
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BrushIcon, {}),
|
|
44238
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44239
|
-
|
|
44238
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44239
|
+
requiresAdmin: true
|
|
44240
44240
|
},
|
|
44241
44241
|
{
|
|
44242
44242
|
label: "Knowledge",
|
|
44243
44243
|
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MenuBookIcon, {}),
|
|
44244
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44245
|
-
|
|
44244
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44245
|
+
requiresAdmin: true
|
|
44246
44246
|
},
|
|
44247
44247
|
{
|
|
44248
44248
|
label: "Storage",
|
|
44249
44249
|
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(StorageIcon, {}),
|
|
44250
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44251
|
-
|
|
44250
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44251
|
+
requiresAdmin: true
|
|
44252
44252
|
},
|
|
44253
44253
|
{
|
|
44254
44254
|
label: "Preferences",
|
|
44255
44255
|
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TuneIcon, {}),
|
|
44256
|
-
requiresFeature: "limitedAdminDashboard"
|
|
44257
|
-
|
|
44256
|
+
requiresFeature: "limitedAdminDashboard",
|
|
44257
|
+
requiresAdmin: false
|
|
44258
44258
|
},
|
|
44259
44259
|
{
|
|
44260
44260
|
label: "Provider",
|
|
44261
44261
|
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CloudIcon, {}),
|
|
44262
|
-
requiresFeature: "advancedSearch"
|
|
44263
|
-
|
|
44262
|
+
requiresFeature: "advancedSearch",
|
|
44263
|
+
requiresAdmin: true
|
|
44264
44264
|
},
|
|
44265
44265
|
{
|
|
44266
44266
|
label: "Tools",
|
|
44267
44267
|
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(BuildIcon, {}),
|
|
44268
|
-
requiresFeature: "advancedSearch"
|
|
44269
|
-
|
|
44268
|
+
requiresFeature: "advancedSearch",
|
|
44269
|
+
requiresAdmin: true
|
|
44270
44270
|
}
|
|
44271
44271
|
];
|
|
44272
|
+
const adminRoleNames = /* @__PURE__ */ new Set([
|
|
44273
|
+
"admin",
|
|
44274
|
+
"super-user",
|
|
44275
|
+
"superuser",
|
|
44276
|
+
"super_admin",
|
|
44277
|
+
"platform_admin",
|
|
44278
|
+
"tenant_admin"
|
|
44279
|
+
]);
|
|
44280
|
+
const userRoles = (authenticationService.parseJwtClaims(authenticationService.getToken() ?? "")?.roles ?? []).map((r) => r.toLowerCase());
|
|
44281
|
+
const isWorkspaceAdmin = userRoles.some((r) => adminRoleNames.has(r) || r.endsWith("-admin"));
|
|
44272
44282
|
const navTabs = allNavTabs.filter((tab) => {
|
|
44283
|
+
if (tab.requiresAdmin && !isWorkspaceAdmin) return false;
|
|
44273
44284
|
if (tab.requiresFeature === "limitedAdminDashboard") {
|
|
44274
44285
|
return hasLimitedAdminDashboard() || hasAdminDashboard();
|
|
44275
44286
|
}
|