diff --git a/changelog/unreleased/fix-vault-shared-mountpoints.md b/changelog/unreleased/fix-vault-shared-mountpoints.md new file mode 100644 index 00000000000..59c9087e86d --- /dev/null +++ b/changelog/unreleased/fix-vault-shared-mountpoints.md @@ -0,0 +1,15 @@ +Bugfix: Show vault-shared mountpoints in the vault drive list + +Shares of vault resources are mountpoints hosted on the shares storage provider +that grant into the vault storage provider. When listing spaces with the vault +`storage_id`, the storage registry skipped the shares provider entirely, so the +vault share mountpoint was missing from the vault drive list while still showing +up in the regular drive list. + +The registry now also queries the shares provider when the vault storage id is +requested and segregates share mountpoints by their `grantStorageID`, so a vault +share only appears in the vault drive list and a regular share only in the +regular one. + +https://github.com/owncloud/ocis/pull/12644 +https://github.com/owncloud/reva/pull/666 diff --git a/go.mod b/go.mod index 9d98d638e5c..3e4e361e060 100644 --- a/go.mod +++ b/go.mod @@ -64,7 +64,7 @@ require ( github.com/open-policy-agent/opa v1.12.3 github.com/orcaman/concurrent-map v1.0.0 github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245 - github.com/owncloud/reva/v2 v2.0.0-20260702095801-b6833225e5d0 + github.com/owncloud/reva/v2 v2.0.0-20260727084321-3219abc8bb59 github.com/pkg/errors v0.9.1 github.com/pkg/xattr v0.4.12 github.com/prometheus/client_golang v1.23.2 diff --git a/go.sum b/go.sum index c9212128910..163fd6cac00 100644 --- a/go.sum +++ b/go.sum @@ -739,8 +739,8 @@ github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HD github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245 h1:JRidLTAKhnvyLMRtVtSF4lhBa0NSAOs6fof+d6JnKII= github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245/go.mod h1:z61VMGAJRtR1nbgXWiNoCkxUXP1B3Je9rMuJbnGd+Og= -github.com/owncloud/reva/v2 v2.0.0-20260702095801-b6833225e5d0 h1:A8iP4Vq1JLQgrIpsa7JtJo7C+ehTbGUdg5/ilekLigA= -github.com/owncloud/reva/v2 v2.0.0-20260702095801-b6833225e5d0/go.mod h1:oHjvB9PhfF8QqiNGz7Hd4AVvR7CSPx3CLVRxUzmjK0w= +github.com/owncloud/reva/v2 v2.0.0-20260727084321-3219abc8bb59 h1:lygF00EnvRNDJ90wi8zs4M/zOwZRKaFnUVb5G3i8r1g= +github.com/owncloud/reva/v2 v2.0.0-20260727084321-3219abc8bb59/go.mod h1:oHjvB9PhfF8QqiNGz7Hd4AVvR7CSPx3CLVRxUzmjK0w= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/pablodz/inotifywaitgo v0.0.9 h1:njquRbBU7fuwIe5rEvtaniVBjwWzcpdUVptSgzFqZsw= diff --git a/vendor/github.com/owncloud/reva/v2/pkg/storage/registry/spaces/spaces.go b/vendor/github.com/owncloud/reva/v2/pkg/storage/registry/spaces/spaces.go index 1ea58a8f1dc..efe440db3aa 100644 --- a/vendor/github.com/owncloud/reva/v2/pkg/storage/registry/spaces/spaces.go +++ b/vendor/github.com/owncloud/reva/v2/pkg/storage/registry/spaces/spaces.go @@ -364,8 +364,11 @@ func (r *registry) findProvidersForFilter(ctx context.Context, filters []*provid currentUser := ctxpkg.ContextMustGetUser(ctx) providerInfos := []*registrypb.ProviderInfo{} for address, provider := range r.c.Providers { - // skip mismatching storageproviders - if storageId != "" && storageId != provider.ProviderID { + // skip mismatching storageproviders. The shares provider hosts the + // mountpoints of vault shares (they grant into the vault provider), so it + // must still be queried when the vault storage id is requested. + if storageId != "" && storageId != provider.ProviderID && + !(storageId == utils.VaultStorageProviderID && provider.ProviderID == utils.ShareStorageProviderID) { continue } // when a specific space type is requested we may skip this provider altogether if it is not configured for that type @@ -404,6 +407,15 @@ func (r *registry) findProvidersForFilter(ctx context.Context, filters []*provid if storageId == "" && provider.ProviderID == utils.VaultStorageProviderID { continue } + // Shares of vault resources are mountpoints hosted on the shares + // provider that grant into the vault provider. Segregate them so + // they only appear in the matching (vault / non-vault) drive list. + if provider.ProviderID == utils.ShareStorageProviderID && space.SpaceType == "mountpoint" { + grantsIntoVault := utils.ReadPlainFromOpaque(space.Opaque, "grantStorageID") == utils.VaultStorageProviderID + if grantsIntoVault != (storageId == utils.VaultStorageProviderID) { + continue + } + } spacePath, err = sc.SpacePath(currentUser, space) if err != nil { appctx.GetLogger(ctx).Error().Err(err).Interface("provider", provider).Interface("space", space).Msg("failed to execute template, continuing") diff --git a/vendor/modules.txt b/vendor/modules.txt index 750a731af0c..f3ccf5b2100 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1322,7 +1322,7 @@ github.com/orcaman/concurrent-map # github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245 ## explicit; go 1.18 github.com/owncloud/libre-graph-api-go -# github.com/owncloud/reva/v2 v2.0.0-20260702095801-b6833225e5d0 +# github.com/owncloud/reva/v2 v2.0.0-20260727084321-3219abc8bb59 ## explicit; go 1.25.7 github.com/owncloud/reva/v2/cmd/revad/internal/grace github.com/owncloud/reva/v2/cmd/revad/runtime