From d24a9ce4631c2563eb4a188e2737300e65714db5 Mon Sep 17 00:00:00 2001 From: Roman Perekhod Date: Fri, 8 Dec 2023 15:23:10 +0100 Subject: [PATCH 1/2] add cli for list and restore trash-bin items --- changelog/unreleased/add-trach-bin-cli.md | 6 ++++++ pkg/storage/utils/decomposedfs/node/permissions.go | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 changelog/unreleased/add-trach-bin-cli.md diff --git a/changelog/unreleased/add-trach-bin-cli.md b/changelog/unreleased/add-trach-bin-cli.md new file mode 100644 index 0000000000..af4cb3c066 --- /dev/null +++ b/changelog/unreleased/add-trach-bin-cli.md @@ -0,0 +1,6 @@ +Enhancement: Add cli commands for trash-bin + +We added the `list` and `restore` commands to the trash-bin items to the CLI + +https://github.com/cs3org/reva/pull/4392 +https://github.com/owncloud/ocis/issues/7845 diff --git a/pkg/storage/utils/decomposedfs/node/permissions.go b/pkg/storage/utils/decomposedfs/node/permissions.go index 84814a1641..1367a6d5d8 100644 --- a/pkg/storage/utils/decomposedfs/node/permissions.go +++ b/pkg/storage/utils/decomposedfs/node/permissions.go @@ -97,6 +97,8 @@ func ServiceAccountPermissions() provider.ResourcePermissions { RemoveGrant: true, // for share expiry ListRecycle: true, // for purge-trash-bin command PurgeRecycle: true, // for purge-trash-bin command + RestoreRecycleItem: true, // for cli restore command + Delete: true, // for cli restore command with replace option } } From dbe284fb3cffb1d40be1894cbfa28c826c6c0a2b Mon Sep 17 00:00:00 2001 From: Roman Perekhod <2403905@gmail.com> Date: Tue, 12 Dec 2023 17:03:10 +0100 Subject: [PATCH 2/2] Update changelog/unreleased/add-trach-bin-cli.md Co-authored-by: kobergj --- changelog/unreleased/add-trach-bin-cli.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/unreleased/add-trach-bin-cli.md b/changelog/unreleased/add-trach-bin-cli.md index af4cb3c066..ed6a896e4e 100644 --- a/changelog/unreleased/add-trach-bin-cli.md +++ b/changelog/unreleased/add-trach-bin-cli.md @@ -1,6 +1,6 @@ -Enhancement: Add cli commands for trash-bin +Enhancement: Add additional permissions to service accounts -We added the `list` and `restore` commands to the trash-bin items to the CLI +We added the `RestoreRecycleItem` and `Delete` permissions to service accounts https://github.com/cs3org/reva/pull/4392 https://github.com/owncloud/ocis/issues/7845