Repository navigation
Make sale hard deletion opt-in and super-admin-only - #1257
Merged
Merged
Conversation
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
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.
Sale hard deletion is now an explicit, off-by-default setting under Core Settings > Sale. Only super admins can see or change the setting and delete sales; other roles are blocked by the API even if they hold ordinary sale-delete permission.
The tooltip explains that the sale leaves active Sales History and its data moves to Recycle Bin. Recycle Bin must be enabled, and deletion stops if the required backup cannot be saved. The setting is not copied between branches. Existing cancellation behavior is unchanged.
Also resolves the main release CodeQL alert in build-asset hashing by checking and reading the same open file descriptor.
Validation: targeted API, role/UI, translation, backup failure and cache tests passed; frontend assets built successfully. The full desktop run passed 4,169 tests and skipped five; its five failures were resolved by adding a missing role fixture and rerunning the timing-sensitive suites sequentially (30/30 passed). The only formatting failure was corrected and rechecked. Lint, docs, packaging and attribution passed. The extra parallel API run was interrupted after database timeouts; all three affected database suites passed sequential retries. The changed API suites passed 802 tests, with additional role/settings tests passing in subsequent runs.