Repository navigation
fix(usershareprovider): prevent setting an expiration on the last space manager - #992
Merged
butonic merged 3 commits intoNov 12, 2026
Merged
Conversation
…ce manager Setting an expiration on the last permanent manager of a space was allowed, which left the space without any manager once the grant expired. UpdateShare only ran the "is a permanent manager remaining" check when the new permissions dropped the manager role. It now also runs when the update gives the share an expiration, via the new mayRemoveLastPermanentManager predicate, since an expiring manager is not a permanent manager.
… check A space needs at least one permanent manager, so giving a space root share an expiration must be checked like downgrading its permissions.
dragonchaser
marked this pull request as ready for review
November 11, 2026 11:17
Member
Author
|
merge #993 first |
Resolve the usershareprovider.go conflict in favour of opencloud-eu#993, which landed the same last manager expiration check first. Its mayRemoveLastPermanentManager is the more precise variant: it resolves the permissions and expiration an update leaves on the share, so only expiring managers trigger the check. Drop this branch's specs that opencloud-eu#993 covers with the same or stronger scenarios and keep the one it lacks: an expiration in the payload is ignored when the update mask does not list it. Co-authored-by: Copilot <[email protected]>
butonic
approved these changes
Nov 12, 2026
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.
Setting an expiration on the last permanent space manager is now denied, so a space can no longer end up without a manager once the grant expires; includes regression specs.