Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable 2.19 backport #4570

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/4570
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
4 changes: 2 additions & 2 deletions internal/grpc/services/gateway/usershareprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ 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 {
return nil, errors.New("gateway: space type is not eligible for sharing")
(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
Expand Down
Loading