Skip to content

Commit

Permalink
fix sharing invite on virtual drive
Browse files Browse the repository at this point in the history
  • Loading branch information
2403905 committed Mar 12, 2024
1 parent fc2867f commit 1b42380
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-graph-invite-virtual.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix sharing invite on virtual drive

We fixed the issue when sharing of virtual drive with other users was allowed

https://github.com/cs3org/reva/pull/4568
https://github.com/owncloud/ocis/issues/8495
1 change: 1 addition & 0 deletions internal/grpc/services/gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
const (
_spaceTypePersonal = "personal"
_spaceTypeProject = "project"
_spaceTypeVirtual = "virtual"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion internal/grpc/services/gateway/usershareprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ 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() == _spaceTypePersonal || req.GetResourceInfo().GetSpace().GetSpaceType() == _spaceTypeVirtual) {
return nil, errors.New("gateway: space type is not eligible for sharing")
}
// If the share is a denial we call denyGrant instead.
Expand Down

0 comments on commit 1b42380

Please sign in to comment.