Skip to content

Commit

Permalink
fix remove/update share permissions when the file is locked
Browse files Browse the repository at this point in the history
  • Loading branch information
2403905 committed Mar 12, 2024
1 parent df43032 commit 9445711
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions changelog/unreleased/fix-remove-update-share.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 0 additions & 4 deletions internal/grpc/services/gateway/usershareprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9445711

Please sign in to comment.