Repository navigation
feat(policy): add the signature rejection workbench module - #9335
Merged
vitormattos merged 2 commits intoNov 5, 2026
Merged
vitormattos merged 2 commits into
vitormattos merged 2 commits into
Conversation
12 of 16 tasks
vitormattos
reviewed
Nov 4, 2026
vitormattos
left a comment
Member
There was a problem hiding this comment.
Requesting a focused regression test for the system fallback composition before resolving this review concern.
Add the policy-local module for the five rejection_* settings: a typed model, a definition that maps them through the generic compound contract, and a rule editor. Values that do not apply while rejection or the comment is disabled are kept, so they can be prepared before the setting is turned on. Delegation and audience rules stay with the backend. The module is registered in the catalog separately. Refs LibreSign#8688 Signed-off-by: André Maia <andrefnkmm@gmail.com>
…rences The fallback handed the whole editor value to compound.compose() as the value of rejection_enabled, so an enabled system value was summarized as disabled. It now returns the value of the parent key. The enabled switch applied the actor's own allowed values to every rule, which locked an instance admin out of a locked system rule and a group admin out of the locked rule of their own group. The limit now applies only to user rules and preferences, and the backend decides the rest. The preferences screen saved the editor object on rejection_enabled, which the backend normalized to false while answering 200, and ignored the other four values. A personal preference behavior now reads the five values, saves them through the compound endpoint and clears all of them. The composed summary no longer escapes labels that are already translated. Signed-off-by: André Maia <andrefnkmm@gmail.com>
maia-andre
force-pushed
the
feat/signature-rejection-workbench-module-8688
branch
from
November 5, 2026 00:48
88b09f1 to
5d83467
Compare
vitormattos
approved these changes
Nov 5, 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.
Resolves: #8688
📝 Summary
Adds the policy-local Policy Workbench module for Signature Rejection under
src/views/Settings/PolicyWorkbench/settings/signature-rejection/. It is not registered in the catalog yet: that is #9336 (#8689), stacked on this one.model.ts: typed normalization of the five backend keys and compose/decompose between them and the editor value. The value unions (cancel/continue,disabled/optional/required,requester/participants/public) come from the generated OpenAPI types, so the module does not add a second source of truth for them.realDefinition.ts: definition keyed byrejection_enabled, with the system, group and user scopes. The five keys go through the genericcompound.compose()/decompose()contract from Make the Policy Workbench compound helper use policy definitions #8687. The child keys come frommeta.compositeChildren, whichSignatureRejectionPolicyalready declares.SignatureRejectionRuleEditor.vue: a switch for rejection and one radio group (NcCheckboxRadioSwitch) for each of the four dependent settings, with translated labels.Points worth a look:
decompose()always writes the five keys.SignatureRejectionPolicyValidator::validateLayer()accepts values prepared while rejection is disabled.SignatureRejectionPolicyown that, and the Workbench shows their errors through its usual flow (covered in feat(policy): register signature rejection in the policy workbench #9336).allowedValues.resolveEditorProps()only receives the parent policy state, so the editor uses the backendallowedValuesofrejection_enabled. They describe the current actor, so they limit the switch only on user rules and preferences; on system and group rules the backend decides on save. The allowed values of the four dependent keys do not reach the editor without an engine change, which this issue rules out. Those options are all listed, and the backend validates them on save.Disabled, or the outcome and the comment mode, for exampleCancel the signing request · No comment.🧪 How to test
To see the editor in the browser, use #9336, which registers the module in the catalog.
Validation evidence
model.spec.ts,realDefinition.spec.ts,SignatureRejectionRuleEditor.spec.tsandpersonalPreferenceBehavior.spec.ts(fallback composition, the enabled switch per scope, saving and clearing a preference, defaults, compose/decompose of all five keys, every editor option, values kept while another option is inactive, summary, emitted value). TheNcCheckboxRadioSwitchstub follows the component's checked/emit contract for radios with avalue. The browser run in feat(policy): register signature rejection in the policy workbench #9336 caught a binding mistake that a simpler stub had hidden, and the editor test fails on that mistake now.npm run lint(no errors, no warnings in the new files),npm run stylelint,npm run ts:check.npx vitest run src/tests/views/Settings/PolicyWorkbench src/tests/views/Preferences src/tests/store/policies.spec.ts, 109 files and 769 tests passing on the feat(policy): register signature rejection in the policy workbench #9336 branch, which also registers the module.🎨 UI / Front-end changes
fieldsetwith alegend; no further audit✅ Checklist
🤖 AI (if applicable)