fix: the account manager cannot act on an account private to somebody else - #944
Merged
blaipr merged 1 commit intoSep 24, 2026
Merged
Conversation
blaipr
deleted the
fix/the-account-manager-cannot-act-on-a-private-account
branch
September 24, 2026 15:35
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.
The account manager's grid deliberately isn't scoped to what the viewer may read, but it does leave out an account private to somebody else.
isPrivatewithholds an account from everybody but its owner, andisPrivateGroupfrom everybody outside its group, application administrators included. The manager's delete and bulk edit didn't apply that rule: they acted on whatever ids were posted. So a holder ofmgmAccountscould delete a private account, or overwrite its client, category, tags and expiry, by posting its (sequential) id. No one but its owner can reach that account anywhere else.Change
Account::assertNotWithheldAsPrivate()applies the same rule asAccountAcl::isWithheldAsPrivate()andAccountFilter::buildFilterPrivate(). A withheld account answers "The account doesn't exist", as the grid answers by not listing it.delete(),deleteByIdBatch()andupdateBulk(), before anything is written or put into history. A selection holding one withheld account is refused whole.addHistoryFor().AccountAcl; the check is the same rule for them.Tests
deleteByIdBatch()of another user's private account is refused, and the owner can still read it afterwards.Mutation-verified: disabling the owner half of the rule fails the two unit refusals and the integration test.