Skip to content

fix(graph): apply the role allowlist to permission updates - #3964

Draft
butonic wants to merge 2 commits into
workpagagesfrom
backport-wp2-753
Draft

butonic wants to merge 2 commits into
workpagagesfrom
backport-wp2-753

Conversation

@butonic

@butonic butonic commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Updating a permission (PATCH .../permissions/{id} and the space root variant) now honours GRAPH_AVAILABLE_ROLES, same as invites. Before, a role the admin had not enabled could not be used to invite, but could be set by updating an existing share.

The three "without enabling it" scenarios in updateShareInvitations.feature now expect a 400. They are the last scenarios in the file and nothing refers to their line numbers, so they just move up. Padding them with blank lines trips the newline_before_scenario gherlint rule.

This is the server half of owncloud/ocis#12540. The reva half (owncloud/reva#653) is in opencloud-eu/reva#993 against reva workpackages. There is no reva bump here: bumping to reva workpackages needs the upload coordinator changes from #3839, and the graph change does not depend on reva anyway.

AI assistance: Claude Code (claude-opus-5-5) ported the change, adapted the acceptance scenarios and ran the graph tests.

Updating a permission or a space root permission did not check the
roles an administrator enabled with GRAPH_AVAILABLE_ROLES. An invite
with a disabled role was rejected, but the same role could be set by
updating an existing share. We now validate updates against the
allowlist, same as invites.

The three "without enabling it" scenarios now expect a 400. Their
removed lines are padded with blank lines so the line numbers of the
scenarios stay the same.

ported from `owncloud/ocis#12540`. The reva half
(`owncloud/reva#653`) is opencloud-eu/reva#993

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@codacy-production

codacy-production Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 6 complexity

Metric Results
Complexity 6

View in Codacy

🟢 Coverage 0.00% diff coverage · +0.01% coverage variation

Metric Results
Coverage variation ✅ +0.01% coverage variation (-1.00%)
Diff coverage ✅ 0.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (cb3a906) 93826 27050 28.83%
Head commit (f1271ef) 93826 (+0) 27059 (+9) 28.84% (+0.01%)

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 (#3964) 2 0 0.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%

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 added the Type:Maintenance E.g. technical debt, packaging, etc. label Nov 11, 2026
The padding kept the scenario line numbers stable but trips the
newline_before_scenario gherlint rule. The three scenarios are the last
ones in the file and nothing refers to their line numbers, so they can
just move up.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type:Maintenance E.g. technical debt, packaging, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants