Skip to content

fix(graph): port share permission and link fixes - #3944

Merged
butonic merged 2 commits into
mainfrom
backport-wp2-batch-e
Nov 13, 2026
Merged

butonic merged 2 commits into
mainfrom
backport-wp2-batch-e

Conversation

@butonic

@butonic butonic commented Nov 10, 2026

Copy link
Copy Markdown
Member

Two small graph fixes ported from upstream:

  • listing permissions no longer fails with a 500 when the public share manager cannot access its metadata space, we skip the link permissions and still return the members (owncloud/ocis#11245)
  • creating a link on the Shares drive root is now rejected with a 400 "cannot create link on shares space root", also for the internal role (owncloud/ocis#11543)

The first one only takes effect once we also port owncloud/reva#264. Our reva replaces the "already exists" error with a generic "error listing public shares", so graph never sees it. It is harmless without it, but I didn't want to pull a reva bump into this PR.

owncloud/ocis#11538 belongs to the same group but is already handled in #3939

AI assistance: Claude Code (claude-opus-5-5) ported the changes, wrote the unit tests and adjusted the acceptance scenarios.

@codacy-production

codacy-production Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity

Metric Results
Complexity 4

View in Codacy

🟢 Coverage 100.00% diff coverage

Metric Results
Coverage variation Report missing for 4bb1fee1
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (4bb1fee) Report Missing Report Missing Report Missing
Head commit (8a56177) 94095 27878 29.63%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3944) 12 12 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@butonic butonic self-assigned this Nov 11, 2026
@butonic
butonic marked this pull request as ready for review November 11, 2026 12:27
@butonic
butonic marked this pull request as draft November 11, 2026 12:28
@butonic

butonic commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Ready for review, but marked as draft until we can merge into main.

@butonic
butonic marked this pull request as ready for review November 13, 2026 17:17
When the public share manager cannot access its metadata space, e.g.
after an upgrade, listing public shares fails with an already exists
error and the whole permissions request ended in a 500. The space
members dialog in web then just keeps spinning.

We now log a warning, skip the link permissions and still return the
user and space permissions.

Our reva currently replaces the original error with a generic "error
listing public shares", so this only takes effect together with the
port of `owncloud/reva#264`, which passes the error message through.

ported from `owncloud/ocis#11245`

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
Creating a link on the root of the Shares drive was only caught later
by the permission check, and an internal link with the internal role
was not rejected at all. We now answer with a 400 "cannot create link
on shares space root" before even looking at the request body, just
like we do for the personal space root.

The acceptance scenarios now expect the new message for the Shares
drive, and the internal link scenario covers the Shares drive again.

ported from `owncloud/ocis#11543`

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
@butonic
butonic force-pushed the backport-wp2-batch-e branch from 403cf86 to 8a56177 Compare November 13, 2026 17:18
@butonic
butonic enabled auto-merge November 13, 2026 17:18
@butonic
butonic merged commit 55b5e7d into main Nov 13, 2026
22 of 60 checks passed
@butonic
butonic deleted the backport-wp2-batch-e branch November 13, 2026 17:50
@openclouders openclouders mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants