strapi-plugin-bulk-updater 1.6.7 → 1.6.9

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.
Files changed (27) hide show
  1. package/dist/_chunks/{BulkUpdater-vPg_CrwY.mjs → BulkUpdater-4E6M5K8J.mjs} +84 -35
  2. package/dist/_chunks/BulkUpdater-4E6M5K8J.mjs.map +1 -0
  3. package/dist/_chunks/{BulkUpdater-Bs4BXQlU.js → BulkUpdater-CKDhgvZ6.js} +84 -35
  4. package/dist/_chunks/BulkUpdater-CKDhgvZ6.js.map +1 -0
  5. package/dist/_chunks/{SettingsPage-D2qYhqpF.mjs → SettingsPage-BX9sCRmw.mjs} +9 -5
  6. package/dist/_chunks/SettingsPage-BX9sCRmw.mjs.map +1 -0
  7. package/dist/_chunks/{SettingsPage-Dv2DRplw.js → SettingsPage-Crh2syU4.js} +7 -3
  8. package/dist/_chunks/SettingsPage-Crh2syU4.js.map +1 -0
  9. package/dist/_chunks/{ValidationRulesTab-BtOCWK8E.mjs → ValidationRulesTab-BqbENLpg.mjs} +144 -33
  10. package/dist/_chunks/ValidationRulesTab-BqbENLpg.mjs.map +1 -0
  11. package/dist/_chunks/{ValidationRulesTab-BTm3QXxM.js → ValidationRulesTab-R1vlW2wY.js} +139 -28
  12. package/dist/_chunks/ValidationRulesTab-R1vlW2wY.js.map +1 -0
  13. package/dist/admin/index.js +14 -4
  14. package/dist/admin/index.js.map +1 -1
  15. package/dist/admin/index.mjs +14 -4
  16. package/dist/admin/index.mjs.map +1 -1
  17. package/dist/server/index.js +291 -32
  18. package/dist/server/index.js.map +1 -1
  19. package/dist/server/index.mjs +291 -32
  20. package/dist/server/index.mjs.map +1 -1
  21. package/package.json +1 -1
  22. package/dist/_chunks/BulkUpdater-Bs4BXQlU.js.map +0 -1
  23. package/dist/_chunks/BulkUpdater-vPg_CrwY.mjs.map +0 -1
  24. package/dist/_chunks/SettingsPage-D2qYhqpF.mjs.map +0 -1
  25. package/dist/_chunks/SettingsPage-Dv2DRplw.js.map +0 -1
  26. package/dist/_chunks/ValidationRulesTab-BTm3QXxM.js.map +0 -1
  27. package/dist/_chunks/ValidationRulesTab-BtOCWK8E.mjs.map +0 -1
@@ -5,7 +5,7 @@ const React = require("react");
5
5
  const admin = require("@strapi/strapi/admin");
6
6
  const designSystem = require("@strapi/design-system");
7
7
  const icons = require("@strapi/icons");
8
- const ValidationRulesTab = require("./ValidationRulesTab-BTm3QXxM.js");
8
+ const ValidationRulesTab = require("./ValidationRulesTab-R1vlW2wY.js");
9
9
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
10
10
  const React__default = /* @__PURE__ */ _interopDefault(React);
11
11
  function parseCsvRows(csvText) {
@@ -1336,6 +1336,7 @@ function buildCsvExportQueryParams(options) {
1336
1336
  function CsvManagerTab() {
1337
1337
  const { get, post } = admin.useFetchClient();
1338
1338
  const { toggleNotification } = admin.useNotification();
1339
+ const permissions = ValidationRulesTab.useBulkUpdaterRBAC();
1339
1340
  const fileInputRef = React.useRef(null);
1340
1341
  const countAbortControllerRef = React.useRef(null);
1341
1342
  const [collections, setCollections] = React.useState([]);
@@ -1440,14 +1441,17 @@ function CsvManagerTab() {
1440
1441
  const [publishStrategy, setPublishStrategy] = React.useState("all");
1441
1442
  const [unreviewedConsent, setUnreviewedConsent] = React.useState(true);
1442
1443
  React.useEffect(() => {
1443
- fetchInitialData();
1444
- }, []);
1444
+ if (permissions.isLoading) return;
1445
+ if (permissions.canCsvExport || permissions.canCsvImport) {
1446
+ fetchInitialData();
1447
+ }
1448
+ }, [permissions.isLoading, permissions.canCsvExport, permissions.canCsvImport]);
1445
1449
  const fetchInitialData = async () => {
1446
1450
  try {
1447
1451
  setLoadingCollections(true);
1448
1452
  const [modelsRes, rulesRes, batchesRes] = await Promise.all([
1449
1453
  get("/bulk-updater/models"),
1450
- get("/bulk-updater/validation-rules"),
1454
+ get("/bulk-updater/validation-rules").catch(() => ({ data: { rules: [] } })),
1451
1455
  get("/bulk-updater/pending-batches").catch(() => ({ data: { batches: [] } }))
1452
1456
  ]);
1453
1457
  if (modelsRes.data?.executionWindow) {
@@ -2134,7 +2138,7 @@ function CsvManagerTab() {
2134
2138
  variant: "tertiary",
2135
2139
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {}),
2136
2140
  onClick: handleDownloadTemplate,
2137
- disabled: !selectedUid || downloadingTemplate,
2141
+ disabled: !selectedUid || downloadingTemplate || !permissions.canCsvExport && !permissions.canCsvImport,
2138
2142
  loading: downloadingTemplate,
2139
2143
  children: "Download Sample CSV Template"
2140
2144
  }
@@ -2547,7 +2551,7 @@ function CsvManagerTab() {
2547
2551
  selectedCol && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 3, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 3, background: selectedDataAttrs.length > 0 ? "primary100" : "neutral100", hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: selectedDataAttrs.length > 0 ? "primary700" : "neutral700", children: selectedDataAttrs.length > 0 ? `Selective Export: Exports Document ID, Slug, and only the selected columns (${selectedDataAttrs.length} selected). Unselected fields and sibling nested properties remain completely protected during CSV import.` : "Full Collection Export: No specific columns selected. All fields will be exported with complete deep nesting preserved in JSON format." }) }) }),
2548
2552
  false
2549
2553
  ] }),
2550
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 5, background: "neutral100", hasRadius: true, children: [
2554
+ permissions.canCsvImport && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 5, background: "neutral100", hasRadius: true, children: [
2551
2555
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", tag: "h3", fontWeight: "bold", marginBottom: 2, children: "2. Import & Batch Override CSV" }),
2552
2556
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", marginBottom: 4, children: "Upload an updated CSV file (supports 10,000+ records via chunked streaming) to bulk update existing records or insert new records." }),
2553
2557
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", marginBottom: 4, wrap: "wrap", gap: 4, children: [
@@ -6375,6 +6379,7 @@ function renderCellContent(colDef, entry, col, selectedAttribute, searchAttribut
6375
6379
  const BulkUpdater = () => {
6376
6380
  const { get, post } = admin.useFetchClient();
6377
6381
  const { toggleNotification } = admin.useNotification();
6382
+ const permissions = ValidationRulesTab.useBulkUpdaterRBAC();
6378
6383
  const getInitialTab = () => {
6379
6384
  try {
6380
6385
  const params = new URLSearchParams(window.location.search);
@@ -6382,6 +6387,12 @@ const BulkUpdater = () => {
6382
6387
  if (t === "audit" || t === "editor" || t === "rules" || t === "csv") return t;
6383
6388
  } catch {
6384
6389
  }
6390
+ if (!permissions.isLoading) {
6391
+ if (permissions.canWorkspaceView) return "editor";
6392
+ if (permissions.canCsvExport || permissions.canCsvImport) return "csv";
6393
+ if (permissions.canAuditView || permissions.canApprovalView) return "audit";
6394
+ if (permissions.canValidationView) return "rules";
6395
+ }
6385
6396
  return "editor";
6386
6397
  };
6387
6398
  const [activeTab, setActiveTabState] = React.useState(getInitialTab);
@@ -6394,6 +6405,22 @@ const BulkUpdater = () => {
6394
6405
  } catch {
6395
6406
  }
6396
6407
  };
6408
+ React.useEffect(() => {
6409
+ if (permissions.isLoading) return;
6410
+ const isTabAllowed = (tab) => {
6411
+ if (tab === "editor") return permissions.canWorkspaceView;
6412
+ if (tab === "audit") return permissions.canAuditView || permissions.canApprovalView;
6413
+ if (tab === "rules") return permissions.canValidationView;
6414
+ if (tab === "csv") return permissions.canCsvExport || permissions.canCsvImport;
6415
+ return false;
6416
+ };
6417
+ if (!isTabAllowed(activeTab)) {
6418
+ if (permissions.canWorkspaceView) setActiveTab("editor");
6419
+ else if (permissions.canCsvExport || permissions.canCsvImport) setActiveTab("csv");
6420
+ else if (permissions.canAuditView || permissions.canApprovalView) setActiveTab("audit");
6421
+ else if (permissions.canValidationView) setActiveTab("rules");
6422
+ }
6423
+ }, [permissions, activeTab]);
6397
6424
  const [loading, setLoading] = React.useState(true);
6398
6425
  const [updating, setUpdating] = React.useState(false);
6399
6426
  const [attributes, setAttributes] = React.useState([]);
@@ -6803,7 +6830,8 @@ const BulkUpdater = () => {
6803
6830
  }
6804
6831
  }
6805
6832
  } catch (err) {
6806
- if (!ValidationRulesTab.isAbortError(err)) {
6833
+ const is403 = err?.response?.status === 403 || err?.status === 403;
6834
+ if (!ValidationRulesTab.isAbortError(err) && !is403) {
6807
6835
  toggleNotification({
6808
6836
  type: "danger",
6809
6837
  message: err?.message || "Failed to fetch audit history."
@@ -6838,17 +6866,34 @@ const BulkUpdater = () => {
6838
6866
  }
6839
6867
  };
6840
6868
  React.useEffect(() => {
6841
- fetchModels();
6842
- fetchAuditHistory();
6843
- fetchPendingBatches();
6844
- fetchValidationRules();
6845
- }, []);
6846
- React.useEffect(() => {
6847
- if (activeTab === "audit") {
6869
+ if (permissions.isLoading) return;
6870
+ if (permissions.canWorkspaceView || permissions.canCsvExport || permissions.canCsvImport || permissions.canValidationView) {
6871
+ fetchModels();
6872
+ }
6873
+ if (permissions.canAuditView) {
6848
6874
  fetchAuditHistory();
6875
+ }
6876
+ if (permissions.canApprovalView) {
6849
6877
  fetchPendingBatches();
6850
6878
  }
6851
- }, [activeTab]);
6879
+ if (permissions.canValidationView) {
6880
+ fetchValidationRules();
6881
+ }
6882
+ }, [
6883
+ permissions.isLoading,
6884
+ permissions.canWorkspaceView,
6885
+ permissions.canCsvExport,
6886
+ permissions.canCsvImport,
6887
+ permissions.canValidationView,
6888
+ permissions.canAuditView,
6889
+ permissions.canApprovalView
6890
+ ]);
6891
+ React.useEffect(() => {
6892
+ if (activeTab === "audit") {
6893
+ if (permissions.canAuditView) fetchAuditHistory();
6894
+ if (permissions.canApprovalView) fetchPendingBatches();
6895
+ }
6896
+ }, [activeTab, permissions.canAuditView, permissions.canApprovalView]);
6852
6897
  const handleApplySearch = () => {
6853
6898
  const nextApplied = {
6854
6899
  searchAttribute,
@@ -8254,7 +8299,7 @@ const BulkUpdater = () => {
8254
8299
  ] }) }),
8255
8300
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, marginBottom: 4, wrap: "wrap", justifyContent: "space-between", alignItems: "center", children: [
8256
8301
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
8257
- /* @__PURE__ */ jsxRuntime.jsx(
8302
+ permissions.canWorkspaceView && /* @__PURE__ */ jsxRuntime.jsx(
8258
8303
  designSystem.Button,
8259
8304
  {
8260
8305
  variant: activeTab === "editor" ? "default" : "tertiary",
@@ -8263,7 +8308,7 @@ const BulkUpdater = () => {
8263
8308
  children: "Bulk Updater Workspace"
8264
8309
  }
8265
8310
  ),
8266
- /* @__PURE__ */ jsxRuntime.jsxs(
8311
+ (permissions.canAuditView || permissions.canApprovalView) && /* @__PURE__ */ jsxRuntime.jsxs(
8267
8312
  designSystem.Button,
8268
8313
  {
8269
8314
  variant: activeTab === "audit" ? "default" : "tertiary",
@@ -8278,7 +8323,7 @@ const BulkUpdater = () => {
8278
8323
  ]
8279
8324
  }
8280
8325
  ),
8281
- /* @__PURE__ */ jsxRuntime.jsx(
8326
+ permissions.canValidationView && /* @__PURE__ */ jsxRuntime.jsx(
8282
8327
  designSystem.Button,
8283
8328
  {
8284
8329
  variant: activeTab === "rules" ? "default" : "tertiary",
@@ -8287,7 +8332,7 @@ const BulkUpdater = () => {
8287
8332
  children: "Validation & Quota Rules"
8288
8333
  }
8289
8334
  ),
8290
- /* @__PURE__ */ jsxRuntime.jsx(
8335
+ (permissions.canCsvExport || permissions.canCsvImport) && /* @__PURE__ */ jsxRuntime.jsx(
8291
8336
  designSystem.Button,
8292
8337
  {
8293
8338
  variant: activeTab === "csv" ? "default" : "tertiary",
@@ -8306,7 +8351,8 @@ const BulkUpdater = () => {
8306
8351
  }
8307
8352
  ) })
8308
8353
  ] }),
8309
- activeTab === "editor" && latestActiveBatch && !updateSummary && /* @__PURE__ */ jsxRuntime.jsx(
8354
+ !permissions.canWorkspaceView && !permissions.canAuditView && !permissions.canApprovalView && !permissions.canValidationView && !permissions.canCsvExport && !permissions.canCsvImport && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 8, background: "neutral0", shadow: "filterShadow", hasRadius: true, marginTop: 4, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Alert, { variant: "warning", title: "Access Denied", children: "You do not have permission to view any modules in Bulk Attribute Updater. Please contact your administrator to grant the required permissions in Settings → Roles." }) }),
8355
+ activeTab === "editor" && permissions.canAuditRollback && latestActiveBatch && !updateSummary && /* @__PURE__ */ jsxRuntime.jsx(
8310
8356
  designSystem.Box,
8311
8357
  {
8312
8358
  padding: 3,
@@ -9520,7 +9566,8 @@ const BulkUpdater = () => {
9520
9566
  size: "L",
9521
9567
  onClick: handleOpenPreviewModal,
9522
9568
  loading: previewLoading,
9523
- disabled: loading || !selectedAttribute || !selectedAttribute.trim() || (gridEditMode ? gridSerialized.targets.length === 0 || gridSerialized.hasValidationErrors : totalSelectedCount === 0),
9569
+ disabled: !permissions.canWorkspaceExecute || (loading || !selectedAttribute || !selectedAttribute.trim() || (gridEditMode ? gridSerialized.targets.length === 0 || gridSerialized.hasValidationErrors : totalSelectedCount === 0)),
9570
+ title: !permissions.canWorkspaceExecute ? "You do not have permission to execute bulk updates (action: plugin::bulk-updater.workspace.execute)." : void 0,
9524
9571
  children: [
9525
9572
  "Preview Changes (",
9526
9573
  gridEditMode ? gridSerialized.targets.length : totalSelectedCount,
@@ -9536,7 +9583,8 @@ const BulkUpdater = () => {
9536
9583
  size: "L",
9537
9584
  onClick: handleOpenConfirmModal,
9538
9585
  loading: updating,
9539
- disabled: loading || !selectedAttribute || !selectedAttribute.trim() || (gridEditMode ? gridSerialized.targets.length === 0 || gridSerialized.hasValidationErrors : totalSelectedCount === 0),
9586
+ disabled: !permissions.canWorkspaceExecute || (loading || !selectedAttribute || !selectedAttribute.trim() || (gridEditMode ? gridSerialized.targets.length === 0 || gridSerialized.hasValidationErrors : totalSelectedCount === 0)),
9587
+ title: !permissions.canWorkspaceExecute ? "You do not have permission to execute bulk updates (action: plugin::bulk-updater.workspace.execute)." : void 0,
9540
9588
  children: [
9541
9589
  "Update Selected (",
9542
9590
  gridEditMode ? gridSerialized.targets.length : totalSelectedCount,
@@ -9544,7 +9592,7 @@ const BulkUpdater = () => {
9544
9592
  ]
9545
9593
  }
9546
9594
  ),
9547
- /* @__PURE__ */ jsxRuntime.jsxs(
9595
+ permissions.canWorkspacePublish && /* @__PURE__ */ jsxRuntime.jsxs(
9548
9596
  designSystem.Button,
9549
9597
  {
9550
9598
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Check, {}),
@@ -9569,8 +9617,8 @@ const BulkUpdater = () => {
9569
9617
  size: "L",
9570
9618
  onClick: handleBulkExportSelected,
9571
9619
  loading: bulkExporting,
9572
- disabled: loading || totalSelectedCount === 0,
9573
- title: "Export selected entries to Excel-compatible CSV with full nested component support",
9620
+ disabled: !permissions.canCsvExport || loading || totalSelectedCount === 0,
9621
+ title: !permissions.canCsvExport ? "You do not have permission to export CSV (action: plugin::bulk-updater.csv.export)." : "Export selected entries to Excel-compatible CSV with full nested component support",
9574
9622
  children: [
9575
9623
  "Export Selected (",
9576
9624
  totalSelectedCount,
@@ -9586,7 +9634,8 @@ const BulkUpdater = () => {
9586
9634
  /* @__PURE__ */ jsxRuntime.jsx(
9587
9635
  designSystem.Checkbox,
9588
9636
  {
9589
- checked: publishOnApproval,
9637
+ checked: permissions.canWorkspacePublish && publishOnApproval,
9638
+ disabled: !permissions.canWorkspacePublish,
9590
9639
  onCheckedChange: (checked) => setPublishOnApproval(Boolean(checked)),
9591
9640
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: "Auto-Publish after Update" })
9592
9641
  }
@@ -9745,7 +9794,7 @@ const BulkUpdater = () => {
9745
9794
  }
9746
9795
  )
9747
9796
  ] }),
9748
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { marginBottom: 6, padding: 5, background: "neutral100", hasRadius: true, style: { border: "1px solid #e6e6ef" }, children: [
9797
+ permissions.canApprovalView && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { marginBottom: 6, padding: 5, background: "neutral100", hasRadius: true, style: { border: "1px solid #e6e6ef" }, children: [
9749
9798
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", marginBottom: 3, children: [
9750
9799
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
9751
9800
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
@@ -9857,7 +9906,7 @@ const BulkUpdater = () => {
9857
9906
  }
9858
9907
  ),
9859
9908
  batch.status === "pending_approval" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9860
- /* @__PURE__ */ jsxRuntime.jsx(
9909
+ permissions.canApprovalApprove && /* @__PURE__ */ jsxRuntime.jsx(
9861
9910
  designSystem.Button,
9862
9911
  {
9863
9912
  size: "S",
@@ -9867,7 +9916,7 @@ const BulkUpdater = () => {
9867
9916
  children: "Approve & Execute"
9868
9917
  }
9869
9918
  ),
9870
- /* @__PURE__ */ jsxRuntime.jsx(
9919
+ permissions.canApprovalReject && /* @__PURE__ */ jsxRuntime.jsx(
9871
9920
  designSystem.Button,
9872
9921
  {
9873
9922
  size: "S",
@@ -9878,7 +9927,7 @@ const BulkUpdater = () => {
9878
9927
  }
9879
9928
  )
9880
9929
  ] }),
9881
- batch.status === "queued_offpeak" && /* @__PURE__ */ jsxRuntime.jsx(
9930
+ batch.status === "queued_offpeak" && permissions.canApprovalApprove && /* @__PURE__ */ jsxRuntime.jsx(
9882
9931
  designSystem.Button,
9883
9932
  {
9884
9933
  size: "S",
@@ -9897,7 +9946,7 @@ const BulkUpdater = () => {
9897
9946
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "beta", textColor: "neutral600", children: "No batch operations recorded in the audit trail yet." }),
9898
9947
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral500", display: "block", marginTop: 2, children: "When you execute a bulk update in the editor, its transactional diff will be logged here." })
9899
9948
  ] }),
9900
- sortedAuditHistory.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { className: "bulk-updater-table-container", style: { width: "100%", maxWidth: "100%", minWidth: 0, overflowX: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Table, { colCount: 6, rowCount: sortedAuditHistory.length + 1, style: { width: "100%" }, children: [
9949
+ permissions.canAuditView && sortedAuditHistory.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { className: "bulk-updater-table-container", style: { width: "100%", maxWidth: "100%", minWidth: 0, overflowX: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Table, { colCount: 6, rowCount: sortedAuditHistory.length + 1, style: { width: "100%" }, children: [
9901
9950
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
9902
9951
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { style: { minWidth: 140 }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: "Date & Time" }) }),
9903
9952
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Th, { style: { minWidth: 130 }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: "Performed By" }) }),
@@ -9991,7 +10040,7 @@ const BulkUpdater = () => {
9991
10040
  ] })
9992
10041
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(designSystem.Badge, { backgroundColor: "success100", textColor: "success700", children: "ACTIVE (APPLIED)" }) }),
9993
10042
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Td, { style: { minWidth: 160, textAlign: "right", whiteSpace: "nowrap" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, justifyContent: "flex-end", children: [
9994
- /* @__PURE__ */ jsxRuntime.jsx(
10043
+ permissions.canAuditDetails && /* @__PURE__ */ jsxRuntime.jsx(
9995
10044
  designSystem.Button,
9996
10045
  {
9997
10046
  variant: "secondary",
@@ -10004,7 +10053,7 @@ const BulkUpdater = () => {
10004
10053
  children: "Report"
10005
10054
  }
10006
10055
  ),
10007
- /* @__PURE__ */ jsxRuntime.jsx(
10056
+ permissions.canAuditDetails && /* @__PURE__ */ jsxRuntime.jsx(
10008
10057
  designSystem.Button,
10009
10058
  {
10010
10059
  variant: "tertiary",
@@ -10013,7 +10062,7 @@ const BulkUpdater = () => {
10013
10062
  children: isExpanded ? "Hide Diffs" : "View Diffs"
10014
10063
  }
10015
10064
  ),
10016
- !rec.isRolledBack && (isLatestEligible ? /* @__PURE__ */ jsxRuntime.jsx(
10065
+ !rec.isRolledBack && permissions.canAuditRollback && (isLatestEligible ? /* @__PURE__ */ jsxRuntime.jsx(
10017
10066
  designSystem.Button,
10018
10067
  {
10019
10068
  variant: "danger",
@@ -10836,4 +10885,4 @@ exports.getNestedValue = getNestedValue;
10836
10885
  exports.getPropertyValue = getPropertyValue;
10837
10886
  exports.getSortOptionsForCollection = getSortOptionsForCollection;
10838
10887
  exports.parseDynamicZonePath = parseDynamicZonePath;
10839
- //# sourceMappingURL=BulkUpdater-Bs4BXQlU.js.map
10888
+ //# sourceMappingURL=BulkUpdater-CKDhgvZ6.js.map