mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-01 18:01:28 -06:00
Merge pull request #7526 from aduffeck/bump-reva-4565fd5
[full-ci] Bump reva
This commit is contained in:
@@ -2,6 +2,7 @@ Enhancement: Bump Reva
|
||||
|
||||
bumps reva version
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7526
|
||||
https://github.com/owncloud/ocis/pull/7138
|
||||
https://github.com/owncloud/ocis/pull/6427
|
||||
https://github.com/owncloud/ocis/pull/7178
|
||||
|
||||
2
go.mod
2
go.mod
@@ -13,7 +13,7 @@ require (
|
||||
github.com/coreos/go-oidc v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.6.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20230727093620-0f4399be4543
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231012102459-2b27cd47ab72
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231018140500-4565fd54f281
|
||||
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
4
go.sum
@@ -1013,8 +1013,8 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo
|
||||
github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
|
||||
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/reva/v2 v2.16.1-0.20231012102459-2b27cd47ab72 h1:53M+ldLYQSxl/iJokKfOUmY0ntMhnATQu9cBZE1X53k=
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231012102459-2b27cd47ab72/go.mod h1:6M5k4UvGUgZh31t4r70RwbesW+w2EM/gd/gpuQZxAPg=
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231018140500-4565fd54f281 h1:XvLyfOO8s4vTIIaxbUnnoWh6pPOdA1OT4Jlc5USr1Og=
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231018140500-4565fd54f281/go.mod h1:6M5k4UvGUgZh31t4r70RwbesW+w2EM/gd/gpuQZxAPg=
|
||||
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=
|
||||
|
||||
23
vendor/github.com/cs3org/reva/v2/pkg/share/manager/jsoncs3/jsoncs3.go
generated
vendored
23
vendor/github.com/cs3org/reva/v2/pkg/share/manager/jsoncs3/jsoncs3.go
generated
vendored
@@ -805,19 +805,18 @@ func (m *Manager) ListReceivedShares(ctx context.Context, filters []*collaborati
|
||||
}
|
||||
|
||||
// add all spaces the user has receved shares for, this includes mount points and share state for groups
|
||||
// TODO: rewrite this code to not use the internal strucs anymore (e.g. by adding a List method). Sync can then be made private.
|
||||
_ = m.UserReceivedStates.Sync(ctx, user.Id.OpaqueId) // ignore error, cache will be updated on next read
|
||||
|
||||
if m.UserReceivedStates.ReceivedSpaces[user.Id.OpaqueId] != nil {
|
||||
for ssid, rspace := range m.UserReceivedStates.ReceivedSpaces[user.Id.OpaqueId].Spaces {
|
||||
if rs, ok := ssids[ssid]; ok {
|
||||
for shareid, state := range rspace.States {
|
||||
// overwrite state
|
||||
rs.States[shareid] = state
|
||||
}
|
||||
} else {
|
||||
ssids[ssid] = rspace
|
||||
spaces, err := m.UserReceivedStates.List(ctx, user.Id.OpaqueId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for ssid, rspace := range spaces {
|
||||
if rs, ok := ssids[ssid]; ok {
|
||||
for shareid, state := range rspace.States {
|
||||
// overwrite state
|
||||
rs.States[shareid] = state
|
||||
}
|
||||
} else {
|
||||
ssids[ssid] = rspace
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -177,15 +177,35 @@ func (c *Cache) Get(ctx context.Context, userID, spaceID, shareID string) (*Stat
|
||||
return c.ReceivedSpaces[userID].Spaces[spaceID].States[shareID], nil
|
||||
}
|
||||
|
||||
// Sync updates the in-memory data with the data from the storage if it is outdated
|
||||
func (c *Cache) Sync(ctx context.Context, userID string) error {
|
||||
// List returns a list of received shares for a given user
|
||||
// The return list is guaranteed to be thread-safe
|
||||
func (c *Cache) List(ctx context.Context, userID string) (map[string]*Space, error) {
|
||||
ctx, span := appctx.GetTracerProvider(ctx).Tracer(tracerName).Start(ctx, "Grab lock")
|
||||
unlock := c.lockUser(userID)
|
||||
span.End()
|
||||
span.SetAttributes(attribute.String("cs3.userid", userID))
|
||||
defer unlock()
|
||||
|
||||
return c.syncWithLock(ctx, userID)
|
||||
err := c.syncWithLock(ctx, userID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
spaces := map[string]*Space{}
|
||||
for spaceID, space := range c.ReceivedSpaces[userID].Spaces {
|
||||
spaceCopy := &Space{
|
||||
States: map[string]*State{},
|
||||
}
|
||||
for shareID, state := range space.States {
|
||||
spaceCopy.States[shareID] = &State{
|
||||
State: state.State,
|
||||
MountPoint: state.MountPoint,
|
||||
Hide: state.Hide,
|
||||
}
|
||||
}
|
||||
spaces[spaceID] = spaceCopy
|
||||
}
|
||||
return spaces, nil
|
||||
}
|
||||
|
||||
func (c *Cache) syncWithLock(ctx context.Context, userID string) error {
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -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.20231012102459-2b27cd47ab72
|
||||
# github.com/cs3org/reva/v2 v2.16.1-0.20231018140500-4565fd54f281
|
||||
## explicit; go 1.20
|
||||
github.com/cs3org/reva/v2/cmd/revad/internal/grace
|
||||
github.com/cs3org/reva/v2/cmd/revad/runtime
|
||||
|
||||
Reference in New Issue
Block a user