diff --git a/catalog/app/containers/Bucket/PackageTree/PackageTree.tsx b/catalog/app/containers/Bucket/PackageTree/PackageTree.tsx
index 99e8f989f86..f57bf8ac84b 100644
--- a/catalog/app/containers/Bucket/PackageTree/PackageTree.tsx
+++ b/catalog/app/containers/Bucket/PackageTree/PackageTree.tsx
@@ -355,12 +355,14 @@ function DirDisplay({
Push to bucket
)}
-
+ {actions.downloadPackage && (
+
+ )}
)}
- {!cfg.noDownload && !deleted && !archived && (
-
+ {BucketPreferences.Result.match(
+ {
+ Ok: ({ ui: { actions } }) =>
+ !cfg.noDownload &&
+ !deleted &&
+ !archived &&
+ actions.downloadPackage && (
+
+ ),
+ Pending: () => (
+
+ ),
+ Init: () => null,
+ },
+ prefs,
)}
{BucketPreferences.Result.match(
diff --git a/catalog/app/containers/Bucket/__snapshots__/ListingActions.spec.tsx.snap b/catalog/app/containers/Bucket/__snapshots__/ListingActions.spec.tsx.snap
index 3cba4bf2847..0f1438ef28d 100644
--- a/catalog/app/containers/Bucket/__snapshots__/ListingActions.spec.tsx.snap
+++ b/catalog/app/containers/Bucket/__snapshots__/ListingActions.spec.tsx.snap
@@ -171,6 +171,51 @@ exports[`components/ListingActions RowActions should render Bucket file 1`] = `
`;
+exports[`components/ListingActions RowActions should render Bucket file without download button 1`] = `
+
+`;
+
exports[`components/ListingActions RowActions should render Package directory 1`] = `
`;
+exports[`components/ListingActions RowActions should render Package directory without download button 1`] = `null`;
+
exports[`components/ListingActions RowActions should render Package file 1`] = `
`;
+exports[`components/ListingActions RowActions should render Package file without download button 1`] = `null`;
+
exports[`components/ListingActions RowActions should render nothing if archived 1`] = `null`;
exports[`components/ListingActions RowActions should render nothing if no route 1`] = `null`;
diff --git a/catalog/app/utils/BucketPreferences/BucketPreferences.spec.ts b/catalog/app/utils/BucketPreferences/BucketPreferences.spec.ts
index 730d005878a..2c4dfc08e2d 100644
--- a/catalog/app/utils/BucketPreferences/BucketPreferences.spec.ts
+++ b/catalog/app/utils/BucketPreferences/BucketPreferences.spec.ts
@@ -8,6 +8,8 @@ const expectedDefaults = {
copyPackage: true,
createPackage: true,
deleteRevision: false,
+ downloadObject: true,
+ downloadPackage: true,
openInDesktop: false,
revisePackage: true,
writeFile: true,
diff --git a/catalog/app/utils/BucketPreferences/BucketPreferences.ts b/catalog/app/utils/BucketPreferences/BucketPreferences.ts
index a58a7c67c04..416e5b0744d 100644
--- a/catalog/app/utils/BucketPreferences/BucketPreferences.ts
+++ b/catalog/app/utils/BucketPreferences/BucketPreferences.ts
@@ -12,6 +12,8 @@ export type ActionPreferences = Record<
| 'copyPackage'
| 'createPackage'
| 'deleteRevision'
+ | 'downloadObject'
+ | 'downloadPackage'
| 'openInDesktop'
| 'revisePackage'
| 'writeFile',
@@ -140,6 +142,8 @@ const defaultPreferences: BucketPreferences = {
copyPackage: true,
createPackage: true,
deleteRevision: false,
+ downloadObject: true,
+ downloadPackage: true,
openInDesktop: false,
revisePackage: true,
writeFile: true,
diff --git a/catalog/app/utils/BucketPreferences/__snapshots__/BucketPreferences.spec.ts.snap b/catalog/app/utils/BucketPreferences/__snapshots__/BucketPreferences.spec.ts.snap
index ad7b925aabd..fc606bacb77 100644
--- a/catalog/app/utils/BucketPreferences/__snapshots__/BucketPreferences.spec.ts.snap
+++ b/catalog/app/utils/BucketPreferences/__snapshots__/BucketPreferences.spec.ts.snap
@@ -5,6 +5,8 @@ exports[`utils/BucketPreferences parse Actions = false disables all actions 1`]
"copyPackage": false,
"createPackage": false,
"deleteRevision": false,
+ "downloadObject": false,
+ "downloadPackage": false,
"openInDesktop": false,
"revisePackage": false,
"writeFile": false,
diff --git a/docs/Catalog/Preferences.md b/docs/Catalog/Preferences.md
index f29085adf79..4b6e1b95b5d 100644
--- a/docs/Catalog/Preferences.md
+++ b/docs/Catalog/Preferences.md
@@ -19,6 +19,8 @@ ui:
actions:
copyPackage: True
createPackage: True
+ downloadObject: True
+ downloadPackage: True
deleteRevision: False
revisePackage: True
writeFile: True
@@ -53,6 +55,8 @@ ui:
* `ui.actions.createPackage: False` - hide buttons to create packages via
drag-and-drop or from folders in S3
* `ui.actions.deleteRevision: True` - show buttons to delete package revision
+* `ui.actions.downloadObject: False` - hide download buttons under "Bucket" tab
+* `ui.actions.downloadPackage: False` - hide download buttons under "Packages" tab
* `ui.actions.revisePackage: False` - hide the button to revise packages
* `ui.actions.writeFile: False` - hide buttons to create or edit files
* `ui.blocks.analytics: False` - hide Analytics block on file page