Skip to content

[stable35] fix(acl): seed tree permissions from the path, not the base permission - #5254

Merged
provokateurin merged 1 commit into
stable35from
backport/5122/stable35
Nov 9, 2026
Merged

provokateurin merged 1 commit into
stable35from
backport/5122/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 9, 2026

Copy link
Copy Markdown

Backport of PR #5122

getPermissionsForTree() can only remove permissions while it walks the
rules below a path, so its starting value is a ceiling. It started from
the folder's base permission, which is 0 when "Do not grant any advanced
permissions by default" is set, so canDeleteTree() refused every delete
in such a folder, even where a rule grants delete.

Start from the permissions resolved for the path itself instead. The
callers have already checked those, and a descendant that withholds
delete still removes it from the result.

Fixes #5010

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Bart Kusters <bart@doconext.com>
@backportbot
backportbot Bot requested a review from provokateurin November 9, 2026 13:25
@backportbot backportbot Bot added bug 3. to review Items that need to be reviewed labels Nov 9, 2026
@backportbot backportbot Bot added this to the Nextcloud 35 milestone Nov 9, 2026
@provokateurin
provokateurin merged commit ada0a47 into stable35 Nov 9, 2026
53 checks passed
@provokateurin
provokateurin deleted the backport/5122/stable35 branch November 9, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Items that need to be reviewed bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants