Skip to content

fix: bump reva to allow space managers to remove others' shares - #12705

Merged
mzner merged 2 commits into
masterfrom
fix/OCISDEV-748/space-manager-cannot-remove-shares-created-by-other-users
Aug 4, 2026
Merged

fix: bump reva to allow space managers to remove others' shares#12705
mzner merged 2 commits into
masterfrom
fix/OCISDEV-748/space-manager-cannot-remove-shares-created-by-other-users

Conversation

@mzner

@mzner mzner commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

Space managers with the RemoveGrant permission on a resource were unable to remove shares created by other users. The removal failed with a generic HTTP 500 (generalexception: error removing share) instead of succeeding.

The root cause was a permission mismatch between two layers of the sharing stack in reva: GetShare and the RemoveShare gRPC handler both allow a user with RemoveGrant/ListGrants permission on the resource to act on a share, but Unshare in the jsoncs3 share manager only allowed the share's creator to remove it. This is fixed upstream in owncloud/reva#687; this PR bumps the reva dependency to pull that fix into oCIS.

Related Issue

Motivation and Context

Space managers are expected to be able to manage all shares within their space, regardless of who created them. Without this fix, only the original sharer could remove a share, which blocked normal space management workflows and surfaced as an opaque server error with no actionable log output.

How Has This Been Tested?

  • test environment: local oCIS build with the patched reva vendored in, full stack via docker compose
  • test case 1: as space manager A, share a file with user C; as space manager B (not the creator), remove the share via the Graph API (DELETE /drives/{driveId}/items/{itemId}/permissions/{permissionId}) — succeeds
  • test case 2: reverted to upstream (unpatched) reva to confirm the same removal reproduces the original HTTP 500
  • reva unit tests: added coverage for Unshare allowing removal by a manager with RemoveGrant and rejecting removal without it; full jsoncs3 package test suite passes

Screenshots (if appropriate):

Types of changes

  • 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:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@mzner
mzner requested a review from a team as a code owner August 3, 2026 08:07
Space managers with the RemoveGrant permission on a resource could not
remove user shares created by other users; the share manager only allowed
the share's creator to remove it. This bumps reva to the commit that fixes
Unshare to also honor the RemoveGrant permission.
@mzner
mzner force-pushed the fix/OCISDEV-748/space-manager-cannot-remove-shares-created-by-other-users branch from 175e7cc to 3915487 Compare August 3, 2026 08:07
@kw-security

kw-security commented Aug 3, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

…o vet

Bumping reva pulled in reva's go 1.26 requirement, and go 1.26's stricter
printf vet analyzer now sees through the OcisLocale interface to flag
gotext.Locale.Get as a printf-wrapper, breaking go test across 5 packages.
Forwarding through func fields hides that static trail from vet.

@2403905 2403905 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please divide the third-party dependency bump?

@mzner

mzner commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Could you please divide the third-party dependency bump?

Could you please let me know how to do that?

@mzner
mzner merged commit 4ba0200 into master Aug 4, 2026
71 checks passed
@mzner
mzner deleted the fix/OCISDEV-748/space-manager-cannot-remove-shares-created-by-other-users branch August 4, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants