Repository: owncloud/ocis
Pull request #11101 (2025-03-05 16:28:19)

[full-ci] Fix the parent-id for the share-jail root
<!--
Thanks for submitting a change to ownCloud!

This is the bug tracker for the oCIS component. Find other components at https://github.com/owncloud/core/blob/master/.github/CONTRIBUTING.md#guidelines

For fixing potential security issues please see https://owncloud.org/security/

To make it possible for us to get your change reviewed and merged please carefully fill out the requested information below.

Please note that any kind of change needs first be submitted to the master branch which holds the next version of oCIS.

Please set the following labels:

- Set label "Status:Needs-Review" for review or "Status:In-Progress" if the PR still has open tasks.
- Assignment: assign to self
- Reviewers: pick at least one
-->

## Description
<!--- Describe your changes in detail -->
Fix the parent-id for the share-jail root.


## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->
- Fixes [#10917](https://github.com/owncloud/ocis/issues/10917)

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
- test environment:
- test case 1:
- test case 2:
- ...

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Technical debt
- [ ] Tests only (no source changes)

## Checklist:
<!-- Tick the checkboxes when done. -->
<!-- Raise documentation ticket in owncloud.github.io/ -->
- [ ] Code changes
- [ ] Unit tests added
- [ ] Acceptance tests added
- [ ] Documentation ticket raised: <link> 


sonarqubecloud[bot]: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=owncloud_ocis&pullRequest=11101) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [1 New Bugs](https://sonarcloud.io/dashboard?id=owncloud_ocis&pullRequest=11101) (required ≤ 0)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=owncloud_ocis&pullRequest=11101)

##   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png '') Catch issues before they fail your Quality Gate with our IDE extension ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png '') [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)


sonarqubecloud[bot]: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=owncloud_ocis&pullRequest=11101) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [1 New Bugs](https://sonarcloud.io/dashboard?id=owncloud_ocis&pullRequest=11101) (required ≤ 0)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=owncloud_ocis&pullRequest=11101)

##   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png '') Catch issues before they fail your Quality Gate with our IDE extension ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png '') [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)



Patch:
diff --git a/changelog/unreleased/fix-parent-id-for-shares.md b/changelog/unreleased/fix-parent-id-for-shares.md
new file mode 100644
index 00000000000..f03127f6ed9
--- /dev/null
+++ b/changelog/unreleased/fix-parent-id-for-shares.md
@@ -0,0 +1,6 @@
+Bugfix: Fix the parent-id for the share-jail root
+
+Fix the parent-id for the share-jail root.
+
+https://github.com/owncloud/ocis/pull/11101
+https://github.com/owncloud/ocis/issues/10917
diff --git a/go.mod b/go.mod
index b0c90825fff..3aaaf6b34b7 100644
--- a/go.mod
+++ b/go.mod
@@ -67,7 +67,7 @@ require (
 	github.com/open-policy-agent/opa v0.70.0
 	github.com/orcaman/concurrent-map v1.0.0
 	github.com/owncloud/libre-graph-api-go v1.0.5-0.20250217093259-fa3804be6c27
-	github.com/owncloud/reva/v2 v2.0.0-20250306080849-10d8d8fcd5c1
+	github.com/owncloud/reva/v2 v2.0.0-20250306100203-80247db10273
 	github.com/pkg/errors v0.9.1
 	github.com/pkg/xattr v0.4.10
 	github.com/prometheus/client_golang v1.20.5
diff --git a/go.sum b/go.sum
index dbfc2259646..f0ac27a4a47 100644
--- a/go.sum
+++ b/go.sum
@@ -881,8 +881,8 @@ github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CF
 github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA=
 github.com/owncloud/libre-graph-api-go v1.0.5-0.20250217093259-fa3804be6c27 h1:ID8s5lGBntmrlI6TbDAjTzRyHucn3bVM2wlW+HBplv4=
 github.com/owncloud/libre-graph-api-go v1.0.5-0.20250217093259-fa3804be6c27/go.mod h1:+gT+x62AS9u2Farh9wE2uYmgdvTg0MQgsSI62D+xoRg=
-github.com/owncloud/reva/v2 v2.0.0-20250306080849-10d8d8fcd5c1 h1:wHi0POy5hJFL4jdu5JsmUn6ZYaImLt9jvyq94h80mgE=
-github.com/owncloud/reva/v2 v2.0.0-20250306080849-10d8d8fcd5c1/go.mod h1:1QUFTq8Q2tjzwY3g+Y1dHIO4tPYqTovV6ScacW3sTPs=
+github.com/owncloud/reva/v2 v2.0.0-20250306100203-80247db10273 h1:3RYbtCjSUiP59Rs3eQFdQV4XlJhbocv9FPYG5386ZVk=
+github.com/owncloud/reva/v2 v2.0.0-20250306100203-80247db10273/go.mod h1:1QUFTq8Q2tjzwY3g+Y1dHIO4tPYqTovV6ScacW3sTPs=
 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.7 h1:1ii49dGBnRn0t1Sz7RGZS6/NberPEDQprwKHN49Bv6U=
diff --git a/vendor/github.com/owncloud/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go b/vendor/github.com/owncloud/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go
index f31011a57ed..0062668f5d2 100644
--- a/vendor/github.com/owncloud/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go
+++ b/vendor/github.com/owncloud/reva/v2/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go
@@ -748,11 +748,11 @@ func (s *service) Stat(ctx context.Context, req *provider.StatRequest) (*provide
 					SpaceId:   utils.ShareStorageSpaceID,
 					OpaqueId:  utils.ShareStorageSpaceID,
 				},
-				Type:          provider.ResourceType_RESOURCE_TYPE_CONTAINER,
-				Mtime:         mtime,
-				Path:          "/",
-				MimeType:      "httpd/unix-directory",
-				Size:          0,
+				Type:     provider.ResourceType_RESOURCE_TYPE_CONTAINER,
+				Mtime:    mtime,
+				Path:     "/",
+				MimeType: "httpd/unix-directory",
+				Size:     0,
 				PermissionSet: &provider.ResourcePermissions{
 					// TODO
 				},
@@ -867,6 +867,12 @@ func (s *service) ListContainer(ctx context.Context, req *provider.ListContainer
 				SpaceId:   utils.ShareStorageSpaceID,
 				OpaqueId:  share.GetShare().GetId().GetOpaqueId(),
 			}
+			// overwrite parent id with the share jail root
+			info.ParentId = &provider.ResourceId{
+				StorageId: utils.ShareStorageProviderID,
+				SpaceId:   utils.ShareStorageSpaceID,
+				OpaqueId:  utils.ShareStorageSpaceID,
+			}
 			info.Path = filepath.Base(share.MountPoint.Path)
 			info.Name = info.Path
 
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 2bfb1b22b99..f4e5be53114 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1219,7 +1219,7 @@ github.com/orcaman/concurrent-map
 # github.com/owncloud/libre-graph-api-go v1.0.5-0.20250217093259-fa3804be6c27
 ## explicit; go 1.18
 github.com/owncloud/libre-graph-api-go
-# github.com/owncloud/reva/v2 v2.0.0-20250306080849-10d8d8fcd5c1
+# github.com/owncloud/reva/v2 v2.0.0-20250306100203-80247db10273
 ## explicit; go 1.22.7
 github.com/owncloud/reva/v2/cmd/revad/internal/grace
 github.com/owncloud/reva/v2/cmd/revad/runtime


Test patch:
diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
index 8d1dc7897a4..457cdf327f8 100644
--- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
+++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
@@ -316,10 +316,6 @@ The expected failures in this file are from features in the owncloud/ocis repo.
 - [apiSearchContent/contentSearch.feature:266](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearchContent/contentSearch.feature#L266)
 - [apiSearchContent/contentSearch.feature:267](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearchContent/contentSearch.feature#L267)
 
-#### [Shares Jail PROPFIND returns different File IDs for the same item](https://github.com/owncloud/ocis/issues/9933)
-
-- [apiSharingNg1/propfindShares.feature:149](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg1/propfindShares.feature#L149)
-
 #### [Readiness check for some services returns 500 status code](https://github.com/owncloud/ocis/issues/10661)
 - [apiServiceAvailability/serviceAvailabilityCheck.feature:111](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L111)
 - [apiServiceAvailability/serviceAvailabilityCheck.feature:120](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L120)