Prevent space managers from purging spaces#672
Merged
Conversation
Managers can disable spaces but only admins can actually delete them.
micbar
approved these changes
Jun 12, 2026
rhafer
approved these changes
Jun 12, 2026
This should also fix some flakiness in the integration test suite where the fallback identification mechanism only works when the parrent has already been assimilated (which is racey).
rhafer
approved these changes
Jun 15, 2026
Member
|
This needs a backport to both stable branches. |
Merged
2 tasks
Member
@micbar Are you sure? This is a pretty breaking change for stable-4.0. We even document that space managers are able to purge spaces: https://docs.opencloud.eu/docs/user/roles/space-roles Backporting to stable-7.0 is of course fine. |
michaelstingl
added a commit
to michaelstingl/opencloud-eu-reva
that referenced
this pull request
Jun 27, 2026
The space index tests added in opencloud-eu#695 purge a project space as its owner (a space manager) and expect success. opencloud-eu#672 later restricted managers to disabling spaces, so that only a delete-all-spaces user may purge. The opencloud-eu#695 branch predated that change and was not rebased onto it, so a textually clean merge left these three tests failing on main. Purge as a delete-all-spaces user instead, matching the current permission model. Disabling stays with the space manager. Test-only, no production change.
michaelstingl
added a commit
to michaelstingl/opencloud-eu-reva
that referenced
this pull request
Jun 27, 2026
… restriction The space index tests added in opencloud-eu#695 purge a project space as its owner (a space manager) and expect success. opencloud-eu#672 later restricted managers to disabling spaces, so that only a delete-all-spaces user may purge. The opencloud-eu#695 branch predated that change and was not rebased onto it, so a textually clean merge left these three tests failing on main. Purge as a delete-all-spaces user in those tests, matching the current permission model, and add the missing counterpart assertion: a space manager may disable a project space but not purge it. Test-only, no production change.
This was referenced Jun 27, 2026
michaelstingl
added a commit
to michaelstingl/opencloud-eu-reva
that referenced
this pull request
Jul 6, 2026
Since opencloud-eu#672 a space manager may disable but not purge a project space. The "can delete (purge) project spaces" context asserts only the denial side ("fails as a space manager" purge); the positive counterpart, that a manager may still disable, was untested. A regression breaking manager disable would pass the suite unnoticed. Add the counterpart It: create a fresh project space and disable it as the space manager, expecting success (the shared space in BeforeEach is already disabled, so the test uses its own). Test-only, no production change.
9 tasks
rhafer
pushed a commit
that referenced
this pull request
Jul 7, 2026
Since #672 a space manager may disable but not purge a project space. The "can delete (purge) project spaces" context asserts only the denial side ("fails as a space manager" purge); the positive counterpart, that a manager may still disable, was untested. A regression breaking manager disable would pass the suite unnoticed. Add the counterpart It: create a fresh project space and disable it as the space manager, expecting success (the shared space in BeforeEach is already disabled, so the test uses its own). Test-only, no production change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Managers can disable spaces but only admins can actually delete them.
Fixes opencloud-eu/opencloud#1799