Merge pull request #7598 from dragonchaser/bump-reva

bump reva
This commit is contained in:
Christian Richter
2023-10-26 18:15:29 +02:00
committed by GitHub
5 changed files with 16 additions and 11 deletions

2
go.mod
View File

@@ -13,7 +13,7 @@ require (
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/coreos/go-oidc/v3 v3.7.0
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781
github.com/cs3org/reva/v2 v2.16.1-0.20231025070619-b57d70a90680
github.com/cs3org/reva/v2 v2.16.1-0.20231026150523-04eb8f6acc8b
github.com/disintegration/imaging v1.6.2
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
github.com/egirna/icap-client v0.1.1

4
go.sum
View File

@@ -1013,8 +1013,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-20231023073225-7748710e0781 h1:BUdwkIlf8IS2FasrrPg8gGPHQPOrQ18MS1Oew2tmGtY=
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva/v2 v2.16.1-0.20231025070619-b57d70a90680 h1:SFxcWCppFQTetG2zc9346tLP0yATRkFGdnP/FsKVc8U=
github.com/cs3org/reva/v2 v2.16.1-0.20231025070619-b57d70a90680/go.mod h1:utPCNSrWDdAwz2biLrKvzO6nDH9L7vRVGNzof13r8Kw=
github.com/cs3org/reva/v2 v2.16.1-0.20231026150523-04eb8f6acc8b h1:AuScJNL7t6/oui68Eg7vlqUVVcyeQMsHvzuO+zgIn9k=
github.com/cs3org/reva/v2 v2.16.1-0.20231026150523-04eb8f6acc8b/go.mod h1:utPCNSrWDdAwz2biLrKvzO6nDH9L7vRVGNzof13r8Kw=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=

View File

@@ -339,14 +339,14 @@ func (s *svc) sspReferenceIsChildOf(ctx context.Context, selector pool.Selectabl
if err != nil {
return false, err
}
if parentStatRes.Status.Code != rpc.Code_CODE_OK {
return false, errtypes.NewErrtypeFromStatus(parentStatRes.Status)
if parentStatRes.GetStatus().GetCode() != rpc.Code_CODE_OK {
return false, errtypes.NewErrtypeFromStatus(parentStatRes.GetStatus())
}
parentAuthCtx, err := authContextForUser(client, parentStatRes.Info.Owner, s.c.MachineAuthAPIKey)
parentAuthCtx, err := authContextForUser(client, parentStatRes.GetInfo().GetOwner(), s.c.MachineAuthAPIKey)
if err != nil {
return false, err
}
parentPathRes, err := client.GetPath(parentAuthCtx, &provider.GetPathRequest{ResourceId: parentStatRes.Info.Id})
parentPathRes, err := client.GetPath(parentAuthCtx, &provider.GetPathRequest{ResourceId: parentStatRes.GetInfo().GetId()})
if err != nil {
return false, err
}
@@ -355,7 +355,7 @@ func (s *svc) sspReferenceIsChildOf(ctx context.Context, selector pool.Selectabl
if err != nil {
return false, err
}
if childStatRes.Status.Code == rpc.Code_CODE_NOT_FOUND && utils.IsRelativeReference(child) && child.Path != "." {
if childStatRes.GetStatus().GetCode() == rpc.Code_CODE_NOT_FOUND && utils.IsRelativeReference(child) && child.Path != "." {
childParentRef := &provider.Reference{
ResourceId: child.ResourceId,
Path: utils.MakeRelativePath(path.Dir(child.Path)),
@@ -365,11 +365,15 @@ func (s *svc) sspReferenceIsChildOf(ctx context.Context, selector pool.Selectabl
return false, err
}
}
childAuthCtx, err := authContextForUser(client, childStatRes.Info.Owner, s.c.MachineAuthAPIKey)
if childStatRes.GetStatus().GetCode() != rpc.Code_CODE_OK {
return false, errtypes.NewErrtypeFromStatus(parentStatRes.Status)
}
// TODO: this should use service accounts https://github.com/owncloud/ocis/issues/7597
childAuthCtx, err := authContextForUser(client, childStatRes.GetInfo().GetOwner(), s.c.MachineAuthAPIKey)
if err != nil {
return false, err
}
childPathRes, err := client.GetPath(childAuthCtx, &provider.GetPathRequest{ResourceId: childStatRes.Info.Id})
childPathRes, err := client.GetPath(childAuthCtx, &provider.GetPathRequest{ResourceId: childStatRes.GetInfo().GetId()})
if err != nil {
return false, err
}

View File

@@ -989,6 +989,7 @@ func (h *Handler) listSharesWithMe(w http.ResponseWriter, r *http.Request) {
}
data.State = mapState(rs.GetState())
data.Hidden = rs.Hidden
h.addFileInfo(ctx, data, info)
h.mapUserIds(r.Context(), client, data)

2
vendor/modules.txt vendored
View File

@@ -357,7 +357,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.16.1-0.20231025070619-b57d70a90680
# github.com/cs3org/reva/v2 v2.16.1-0.20231026150523-04eb8f6acc8b
## explicit; go 1.20
github.com/cs3org/reva/v2/cmd/revad/internal/grace
github.com/cs3org/reva/v2/cmd/revad/runtime