From 9445711211cf8f65dc4b46832ba4420464d909b4 Mon Sep 17 00:00:00 2001 From: Roman Perekhod Date: Wed, 21 Feb 2024 21:03:15 +0100 Subject: [PATCH] fix remove/update share permissions when the file is locked --- changelog/unreleased/fix-remove-update-share.md | 8 ++++++++ internal/grpc/services/gateway/usershareprovider.go | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/fix-remove-update-share.md diff --git a/changelog/unreleased/fix-remove-update-share.md b/changelog/unreleased/fix-remove-update-share.md new file mode 100644 index 00000000000..9740a060126 --- /dev/null +++ b/changelog/unreleased/fix-remove-update-share.md @@ -0,0 +1,8 @@ +Bugfix: Fix remove/update share permissions + +This is a workaround that should prevent removing or changing the share permissions when the file is locked. +These limitations have to be removed after the wopi server will be able to unlock the file properly. +These limitations are not spread on the files inside the shared folder. + +https://github.com/cs3org/reva/pull/4534 +https://github.com/owncloud/ocis/issues/8273 diff --git a/internal/grpc/services/gateway/usershareprovider.go b/internal/grpc/services/gateway/usershareprovider.go index e115db71291..9a27f8f9c55 100644 --- a/internal/grpc/services/gateway/usershareprovider.go +++ b/internal/grpc/services/gateway/usershareprovider.go @@ -585,10 +585,6 @@ func (s *svc) addShare(ctx context.Context, req *collaboration.CreateShareReques } func (s *svc) addSpaceShare(ctx context.Context, req *collaboration.CreateShareRequest) (*collaboration.CreateShareResponse, error) { - if refIsSpaceRoot(req.GetResourceInfo().GetId()) && - (req.GetResourceInfo().GetSpace().GetSpaceType() == _spaceTypePersonal || req.GetResourceInfo().GetSpace().GetSpaceType() == _spaceTypeVirtual) { - return &collaboration.CreateShareResponse{Status: status.NewInvalid(ctx, "space type is not eligible for sharing")}, nil - } // If the share is a denial we call denyGrant instead. var st *rpc.Status var err error