mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-24 08:27:27 -04:00
fix removing groups from space
This commit is contained in:
committed by
Ralf Haferkamp
parent
48617779fc
commit
38f9698973
6
changelog/unreleased/fix-remove-group-from-share.md
Normal file
6
changelog/unreleased/fix-remove-group-from-share.md
Normal file
@@ -0,0 +1,6 @@
|
||||
Bugfix: Fix removing groups from space
|
||||
|
||||
We fixed a bug when unable to remove groups from space via graph
|
||||
|
||||
https://github.com/owncloud/ocis/pull/8803
|
||||
https://github.com/owncloud/ocis/issues/8768
|
||||
@@ -15,6 +15,7 @@ import (
|
||||
"time"
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
grouppb "github.com/cs3org/go-cs3apis/cs3/identity/group/v1beta1"
|
||||
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
cs3rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
|
||||
storageprovider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
@@ -359,17 +360,21 @@ func spacePermissionIdToCS3Grantee(permissionID string) (storageprovider.Grantee
|
||||
switch parts[0] {
|
||||
case "u":
|
||||
grantee.Type = storageprovider.GranteeType_GRANTEE_TYPE_USER
|
||||
grantee.Id = &storageprovider.Grantee_UserId{
|
||||
UserId: &userpb.UserId{
|
||||
OpaqueId: parts[1],
|
||||
},
|
||||
}
|
||||
case "g":
|
||||
grantee.Type = storageprovider.GranteeType_GRANTEE_TYPE_GROUP
|
||||
grantee.Id = &storageprovider.Grantee_GroupId{
|
||||
GroupId: &grouppb.GroupId{
|
||||
OpaqueId: parts[1],
|
||||
},
|
||||
}
|
||||
default:
|
||||
return grantee, errorcode.New(errorcode.InvalidRequest, "invalid space permission id")
|
||||
}
|
||||
|
||||
grantee.Id = &storageprovider.Grantee_UserId{
|
||||
UserId: &userpb.UserId{
|
||||
OpaqueId: parts[1],
|
||||
},
|
||||
}
|
||||
return grantee, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user