mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-04 03:09:33 -06:00
Merge pull request #10172 from owncloud/fix-sharejail-stat-id
[full-ci] bump reva to 02af5a266
This commit is contained in:
@@ -2,5 +2,6 @@ Enhancement: Bump reva
|
||||
|
||||
Bumps reva version
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10172
|
||||
https://github.com/owncloud/ocis/pull/10157
|
||||
https://github.com/owncloud/ocis/pull/9817
|
||||
|
||||
2
go.mod
2
go.mod
@@ -15,7 +15,7 @@ require (
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.11.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20240724121416-062c4e3046cb
|
||||
github.com/cs3org/reva/v2 v2.24.2-0.20240926082340-b5c3c6781528
|
||||
github.com/cs3org/reva/v2 v2.24.2-0.20240930121615-c33c803283ee
|
||||
github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25
|
||||
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
|
||||
github.com/egirna/icap-client v0.1.1
|
||||
|
||||
4
go.sum
4
go.sum
@@ -255,8 +255,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
|
||||
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20240724121416-062c4e3046cb h1:KmYZDReplv/yfwc1LNYpDcVhVujC3Pasv6WjXx1haSU=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20240724121416-062c4e3046cb/go.mod h1:yyP8PRo0EZou3nSH7H4qjlzQwaydPeIRNgX50npQHpE=
|
||||
github.com/cs3org/reva/v2 v2.24.2-0.20240926082340-b5c3c6781528 h1:sNq9lYNXQeqGGGe8m9zGdzBiw2QYs4fe0zXYTFfD++g=
|
||||
github.com/cs3org/reva/v2 v2.24.2-0.20240926082340-b5c3c6781528/go.mod h1:p7CHBXcg6sSqB+0JMNDfC1S7TSh9FghXkw1kTV3KcJI=
|
||||
github.com/cs3org/reva/v2 v2.24.2-0.20240930121615-c33c803283ee h1:+1sYiuA9LRQIznBNG1AFQoIGdCUCqQT1Dof2rTTsDm8=
|
||||
github.com/cs3org/reva/v2 v2.24.2-0.20240930121615-c33c803283ee/go.mod h1:p7CHBXcg6sSqB+0JMNDfC1S7TSh9FghXkw1kTV3KcJI=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
|
||||
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
|
||||
|
||||
@@ -86,6 +86,9 @@ func (g Graph) AssignTags(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// use resource id from stat response to work on the actual resource and not a share jail item
|
||||
rid = *sres.GetInfo().GetId()
|
||||
|
||||
pm := sres.GetInfo().GetPermissionSet()
|
||||
if pm == nil {
|
||||
g.logger.Error().Err(err).Msg("no permissionset on file")
|
||||
@@ -185,6 +188,9 @@ func (g Graph) UnassignTags(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// use resource id from stat response to work on the actual resource and not a share jail item
|
||||
rid = *sres.GetInfo().GetId()
|
||||
|
||||
pm := sres.GetInfo().GetPermissionSet()
|
||||
if pm == nil {
|
||||
g.logger.Error().Err(err).Msg("no permissionset on file")
|
||||
|
||||
@@ -49,7 +49,7 @@ Feature: propfind a shares
|
||||
| textfile.txt | textfile (1).txt |
|
||||
| folderToShare | folderToShare (1) |
|
||||
|
||||
@issue-4421
|
||||
@issue-4421 @issue-9933 @skip
|
||||
Scenario Outline: sharee PROPFIND same name shares shared by multiple users using new dav path
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file with content "to share" to "textfile.txt"
|
||||
@@ -93,7 +93,7 @@ Feature: propfind a shares
|
||||
| new | textfile.txt | textfile (1).txt |
|
||||
| new | folderToShare | folderToShare (1) |
|
||||
|
||||
@issue-4421
|
||||
@issue-4421 @issue-9933 @skip
|
||||
Scenario: sharee PROPFIND shares with bracket in the name
|
||||
Given using spaces DAV path
|
||||
And user "Alice" has created folder "folderToShare"
|
||||
|
||||
@@ -789,21 +789,26 @@ func (s *service) Stat(ctx context.Context, req *provider.StatRequest) (*provide
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO return reference?
|
||||
return gatewayClient.Stat(ctx, &provider.StatRequest{
|
||||
statRes, err := gatewayClient.Stat(ctx, &provider.StatRequest{
|
||||
Opaque: req.Opaque,
|
||||
Ref: buildReferenceInShare(req.Ref, receivedShare),
|
||||
ArbitraryMetadataKeys: req.ArbitraryMetadataKeys,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// FIXME when stating a share jail child we need to rewrite the id and use the share
|
||||
// when stating a share jail mountpoint we need to rewrite the id and use the share
|
||||
// jail space id as the mountpoint has a different id than the grant
|
||||
// but that might be problematic for eg. wopi because it needs the correct id? ...
|
||||
// ... but that should stat the grant anyway
|
||||
|
||||
// FIXME when navigating via /dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668 the web ui seems
|
||||
// to continue navigating based on the id of resources, causing the path to change. Is that related to WOPI?
|
||||
if statRes.GetStatus().GetCode() == rpc.Code_CODE_OK && receivedShare.MountPoint.Path == strings.TrimPrefix(req.Ref.Path, "./") && statRes.Info != nil {
|
||||
statRes.Info.Id = &provider.ResourceId{
|
||||
StorageId: utils.ShareStorageProviderID,
|
||||
SpaceId: utils.ShareStorageSpaceID,
|
||||
OpaqueId: receivedShare.GetShare().GetId().GetOpaqueId(),
|
||||
}
|
||||
}
|
||||
|
||||
return statRes, nil
|
||||
}
|
||||
|
||||
func (s *service) ListContainerStream(req *provider.ListContainerStreamRequest, ss provider.ProviderAPI_ListContainerStreamServer) error {
|
||||
|
||||
25
vendor/github.com/cs3org/reva/v2/pkg/storage/utils/metadata/cs3.go
generated
vendored
25
vendor/github.com/cs3org/reva/v2/pkg/storage/utils/metadata/cs3.go
generated
vendored
@@ -22,6 +22,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -107,6 +108,27 @@ func (cs3 *CS3) Init(ctx context.Context, spaceid string) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
lsRes, err := client.ListStorageSpaces(ctx, &provider.ListStorageSpacesRequest{
|
||||
Filters: []*provider.ListStorageSpacesRequest_Filter{
|
||||
{
|
||||
Type: provider.ListStorageSpacesRequest_Filter_TYPE_ID,
|
||||
Term: &provider.ListStorageSpacesRequest_Filter_Id{
|
||||
Id: &provider.StorageSpaceId{OpaqueId: spaceid + "!" + spaceid},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
switch {
|
||||
case err != nil:
|
||||
return err
|
||||
case lsRes.Status.Code == rpc.Code_CODE_OK && len(lsRes.StorageSpaces) > 0:
|
||||
if len(lsRes.StorageSpaces) > 0 {
|
||||
cs3.SpaceRoot = lsRes.StorageSpaces[0].Root
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME change CS3 api to allow sending a space id
|
||||
cssr, err := client.CreateStorageSpace(ctx, &provider.CreateStorageSpaceRequest{
|
||||
Opaque: &types.Opaque{
|
||||
@@ -127,8 +149,7 @@ func (cs3 *CS3) Init(ctx context.Context, spaceid string) (err error) {
|
||||
case cssr.Status.Code == rpc.Code_CODE_OK:
|
||||
cs3.SpaceRoot = cssr.StorageSpace.Root
|
||||
case cssr.Status.Code == rpc.Code_CODE_ALREADY_EXISTS:
|
||||
// TODO make CreateStorageSpace return existing space?
|
||||
cs3.SpaceRoot = &provider.ResourceId{SpaceId: spaceid, OpaqueId: spaceid}
|
||||
return errtypes.AlreadyExists(fmt.Sprintf("user %s does not have access to metadata space %s, but it exists", cs3.serviceUser.Id.OpaqueId, spaceid))
|
||||
default:
|
||||
return errtypes.NewErrtypeFromStatus(cssr.Status)
|
||||
}
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -367,7 +367,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1
|
||||
github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1
|
||||
github.com/cs3org/go-cs3apis/cs3/tx/v1beta1
|
||||
github.com/cs3org/go-cs3apis/cs3/types/v1beta1
|
||||
# github.com/cs3org/reva/v2 v2.24.2-0.20240926082340-b5c3c6781528
|
||||
# github.com/cs3org/reva/v2 v2.24.2-0.20240930121615-c33c803283ee
|
||||
## explicit; go 1.21
|
||||
github.com/cs3org/reva/v2/cmd/revad/internal/grace
|
||||
github.com/cs3org/reva/v2/cmd/revad/runtime
|
||||
|
||||
Reference in New Issue
Block a user