Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
354 commits
Select commit Hold shift + click to select a range
5c6d97c
feat(openapi): implement openapi-administration behavior
vitormattos Mar 20, 2026
190c9ad
feat(openapi): implement openapi-full behavior
vitormattos Mar 20, 2026
09624b1
feat(Settings): implement Settings behavior
vitormattos Mar 20, 2026
0fe3a6c
test(Controller): cover PolicyControllerTest behavior
vitormattos Mar 20, 2026
97da2d2
test(Policy): cover PolicyServiceTest behavior
vitormattos Mar 20, 2026
ec0cfe9
test(Runtime): cover DefaultPolicyResolverTest behavior
vitormattos Mar 20, 2026
f7b449e
test(Runtime): cover PolicySourceTest behavior
vitormattos Mar 20, 2026
d9d70c1
test(e2e): cover policy-workbench-system-default-persistence.spec beh…
vitormattos Mar 20, 2026
65589ad
test(Settings): cover PolicyCatalog.spec behavior
vitormattos Mar 20, 2026
9b32bde
test(PolicyWorkbench): cover SignatureFlowScalarRuleEditor.spec behavior
vitormattos Mar 20, 2026
78029a7
test(Settings): cover SignatureFlowGroupPolicy.spec behavior
vitormattos Mar 20, 2026
d422a48
test(Settings): cover usePolicyWorkbench.spec behavior
vitormattos Mar 20, 2026
535e794
feat(PolicyWorkbench): implement PolicyRuleCard behavior
vitormattos Mar 20, 2026
d05539f
feat(PolicyWorkbench): implement SettingsPolicyWorkbench behavior
vitormattos Mar 20, 2026
5532063
feat(PolicyWorkbench): implement SigningOrderPolicyWorkbench behavior
vitormattos Mar 20, 2026
ca7b934
feat(confetti): implement ConfettiRuleEditor behavior
vitormattos Mar 20, 2026
a59523f
feat(confetti): implement index behavior
vitormattos Mar 20, 2026
15d7f28
feat(identify-factors): implement IdentifyFactorsRuleEditor behavior
vitormattos Mar 20, 2026
fdce230
feat(identify-factors): implement index behavior
vitormattos Mar 20, 2026
508ad54
feat(signature-flow): implement SignatureFlowRuleEditor behavior
vitormattos Mar 20, 2026
59bb198
feat(signature-flow): implement SignatureFlowScalarRuleEditor behavior
vitormattos Mar 20, 2026
7664aa7
feat(signature-flow): implement index behavior
vitormattos Mar 20, 2026
2623a3c
feat(signature-stamp): implement SignatureStampRuleEditor behavior
vitormattos Mar 20, 2026
c73ef0e
feat(signature-stamp): implement index behavior
vitormattos Mar 20, 2026
c0ab532
feat(PolicyWorkbench): implement types behavior
vitormattos Mar 20, 2026
1e77af4
feat(PolicyWorkbench): implement usePolicyWorkbench behavior
vitormattos Mar 20, 2026
47afe27
feat(Settings): implement SignatureFlowGroupPolicy behavior
vitormattos Mar 20, 2026
0b2debf
feat(SignatureFlowPolicy): implement PolicyCatalog behavior
vitormattos Mar 20, 2026
12581bd
test(admin): cover policies behavior
vitormattos Mar 20, 2026
a33dfe4
style(policy-workbench): align inline note actions vertically
vitormattos Mar 20, 2026
6a325fa
test(admin): inject policy service mock in AdminTest
vitormattos Mar 20, 2026
e15f0c0
test(e2e): align policy-workbench spec with RealPolicyWorkbench labels
vitormattos Mar 20, 2026
0f5fd4a
chore(openapi): regenerate administration spec
vitormattos Mar 20, 2026
fed7c6c
chore(openapi): regenerate full spec
vitormattos Mar 20, 2026
22d1cae
chore(types): regenerate administration openapi types
vitormattos Mar 20, 2026
2858d84
chore(types): regenerate full openapi types
vitormattos Mar 20, 2026
513844e
test(settings): drop frozen preview coverage
vitormattos Mar 20, 2026
741fafe
refactor(settings): remove local frozen preview import
vitormattos Mar 20, 2026
83de5f4
chore(deps): bump phpseclib to 3.0.50
vitormattos Mar 20, 2026
6d6b73a
test(playwright): support rule and override labels in policy workbench
vitormattos Mar 20, 2026
f33d7af
test(playwright): retry policy rule removal clicks
vitormattos Mar 20, 2026
b0728ac
chore(userconfig): add policy workbench layout preference key
vitormattos Mar 20, 2026
125e5b3
fix(settings): persist layout toggle and improve policy row layout
vitormattos Mar 20, 2026
dc5e743
fix(account): expose policy workbench layout config in bootstrap
vitormattos Mar 20, 2026
820fb89
fix(account): preserve false user config values
vitormattos Mar 20, 2026
5b074ba
fix(settings): bootstrap user config in admin settings
vitormattos Mar 20, 2026
ebea59c
test(settings): cover admin config initial state
vitormattos Mar 20, 2026
e0afdba
feat: add internal routes for preferences and policies
vitormattos Mar 20, 2026
f0d9c3e
feat: expose preferences and policies in settings menu
vitormattos Mar 20, 2026
3e25be1
feat: add preferences view for signature flow policy
vitormattos Mar 20, 2026
8bd908b
feat: add policies view wrapper for workbench
vitormattos Mar 20, 2026
8948f38
feat: expose group policy management capability in account config
vitormattos Mar 20, 2026
2e48c80
feat: enforce group policy authorization in policy controller
vitormattos Mar 20, 2026
41ac65a
test: cover group policy authorization in policy controller
vitormattos Mar 20, 2026
c5a9016
test: verify settings menu visibility with policy capability
vitormattos Mar 20, 2026
16051ce
test: add coverage for preferences view behavior
vitormattos Mar 20, 2026
fc2833c
test: fix signature engine l10n mock initialization
vitormattos Mar 20, 2026
45e0fd6
chore: update openapi files
vitormattos Mar 20, 2026
f4106be
fix(policy): enforce strict bool allowChildOverride parsing
vitormattos Mar 20, 2026
61fcd24
test(policy): cover strict bool allowChildOverride contract
vitormattos Mar 20, 2026
17014bc
refactor(db): rename decoded policy json accessor
vitormattos Mar 20, 2026
163bb7c
refactor(policy): use decoded permission set policy accessor
vitormattos Mar 20, 2026
deb5c12
test(db): cover decoded policy json accessor behavior
vitormattos Mar 20, 2026
b9f3475
test(policy): align runtime source assertions with decoded accessor
vitormattos Mar 20, 2026
fca820a
feat(account): allow subadmins to manage group policies
vitormattos Mar 20, 2026
8ad90d1
test(account): cover subadmin group policy capability
vitormattos Mar 20, 2026
0e44983
feat(policy-workbench): hydrate persisted group policies on open
vitormattos Mar 20, 2026
697ce8f
test(policy-workbench): verify persisted group rule hydration
vitormattos Mar 20, 2026
919630a
fix(types): use policy group operations from api schema
vitormattos Mar 20, 2026
8500d57
test(playwright): add group and subadmin provisioning helpers
vitormattos Mar 20, 2026
85cc5f7
test(playwright): reset session before provisioning login
vitormattos Mar 20, 2026
70aa160
test(e2e): add personas permissions scenario for policy workbench
vitormattos Mar 20, 2026
86e1f35
chore(test): normalize eof newline in preferences spec
vitormattos Mar 20, 2026
99fb064
chore(policies): normalize eof newline in policies view
vitormattos Mar 20, 2026
ad6e71c
chore(preferences): normalize eof newline in preferences view
vitormattos Mar 20, 2026
f079641
fix: reset policy tables in developer reset
vitormattos Mar 20, 2026
7458e2f
test: cleanup policy state in admin policies feature
vitormattos Mar 20, 2026
c8a1f4e
test: use post cleanup for system signature_flow policy
vitormattos Mar 20, 2026
9ccc906
refactor(policy): namespace signature_flow system config key
vitormattos Mar 20, 2026
beb8860
feat(migration): migrate legacy signature_flow policy keys
vitormattos Mar 20, 2026
a0a4ab7
fix(policy): disable circle layer in signature_flow phase
vitormattos Mar 20, 2026
fc39762
test(policy): update source expectations for namespaced key
vitormattos Mar 20, 2026
1d9498e
test(migration): cover signature_flow legacy key migration
vitormattos Mar 20, 2026
c8cd6a5
docs(api): align signatureFlow param with policy resolver
vitormattos Mar 20, 2026
64d0b2f
chore(openapi): regenerate openapi json
vitormattos Mar 20, 2026
10a13f5
chore(openapi): regenerate openapi full json
vitormattos Mar 20, 2026
88c2794
chore(openapi): regenerate openapi types
vitormattos Mar 20, 2026
e9df1b1
chore(openapi): regenerate openapi full types
vitormattos Mar 20, 2026
932c9a7
test(policy): assert circle layer is ignored in phase 1
vitormattos Mar 20, 2026
95f03c1
feat(policy): add resolution mode to policy definition contract
vitormattos Mar 23, 2026
551545e
feat(policy): support resolution mode in policy spec
vitormattos Mar 23, 2026
ba82508
feat(policy): classify signature flow as value choice
vitormattos Mar 23, 2026
3431b14
feat(policy): resolve group value-choice layers by union
vitormattos Mar 23, 2026
5cc22a8
test(policy): cover policy spec resolution mode
vitormattos Mar 23, 2026
d725318
test(policy): cover signature flow value-choice resolution
vitormattos Mar 23, 2026
04c38d1
test(e2e): cover signature flow persistence in request sidebar
vitormattos Mar 23, 2026
6cd3f3c
feat(workbench): simplify policy workbench UI with single-column layo…
vitormattos Mar 23, 2026
0da7a39
feat(workbench): enhance policy state with sticky summary and resolut…
vitormattos Mar 23, 2026
63bc9f7
test(workbench): add comprehensive tests for policy state and sticky …
vitormattos Mar 23, 2026
9104bed
test(workbench): format spec file after component refactoring
vitormattos Mar 23, 2026
13006cc
fix(workbench): guard editor draft access and restore mobile dialog w…
vitormattos Mar 23, 2026
53e4b8d
feat(workbench): switch exceptions UI to scalable tabs and tables
vitormattos Mar 23, 2026
f944439
refactor(workbench): tighten visual hierarchy and table scanability
vitormattos Mar 23, 2026
3a33b64
refactor(workbench): polish summary and table usability details
vitormattos Mar 23, 2026
1c08845
refactor(workbench): adopt nextcloud actions and clean top workspace
vitormattos Mar 23, 2026
dbe8bcd
refactor(workbench): add action icons and stabilize inheritance help …
vitormattos Mar 23, 2026
2041cb5
fix(workbench): keep inheritance help inside summary card context
vitormattos Mar 23, 2026
fb17b74
refactor(workbench): simplify UI hierarchy - remove banner, use plain…
vitormattos Mar 23, 2026
5aee4f0
fix(policy): refresh UI state after saving policies
vitormattos Mar 23, 2026
be1c1a1
refactor(policy): unify rule management in single CRUD table
vitormattos Mar 23, 2026
7efb04f
fix(policy): disable create action when selected scope is blocked
vitormattos Mar 24, 2026
a547296
test(policy): cover numeric system value in global editor
vitormattos Mar 24, 2026
43e98f9
fix(policy): normalize numeric global rule values on edit
vitormattos Mar 24, 2026
260ced1
test(policy): cover create rule blocked when no system rule set
vitormattos Mar 24, 2026
febcb07
fix(policy): block create rule only when allowChildOverride is explic…
vitormattos Mar 24, 2026
d5adb7a
test(policy): cover scope-driven create flow and empty global default…
vitormattos Mar 24, 2026
a2ab8c5
refactor(policy): extract shared rule editor panel component
vitormattos Mar 24, 2026
337cf2d
feat(policy): simplify workbench create flow and discard confirmation UX
vitormattos Mar 24, 2026
6238bca
test(policy): cover decoupled create scope from rule filter
vitormattos Mar 24, 2026
43de34e
fix(policy): separate create scope control from scope filter
vitormattos Mar 24, 2026
a797862
test(policy): cover create scope prompt dialog flow
vitormattos Mar 24, 2026
e162ca1
feat(policy): ask create scope through prompt dialog
vitormattos Mar 24, 2026
2232df9
test(policy): cover explicit scope filter labeling
vitormattos Mar 24, 2026
e625e15
fix(policy): label scope radios as table filter
vitormattos Mar 24, 2026
ae57b63
test(policy): cover files-style filter entrypoint in workbench
vitormattos Mar 24, 2026
9b9f1c2
feat(policy): adopt files-style scope filters with popover and chips
vitormattos Mar 24, 2026
cbdd3aa
test(policy): assert compact workbench header copy
vitormattos Mar 24, 2026
1445014
feat(policy): tighten workbench header layout and copy
vitormattos Mar 24, 2026
29c972b
test(policy): cover app-navigation search actions in workbench
vitormattos Mar 27, 2026
412f03f
feat(policy): use app navigation search for rule toolbar
vitormattos Mar 27, 2026
d6fed17
fix(policy): keep toolbar actions visible while searching
vitormattos Mar 27, 2026
009c700
test(policy): cover role-specific user override behavior in real work…
vitormattos Mar 27, 2026
9d91083
test(policy): map blocked target-user policy save to bad request
vitormattos Mar 27, 2026
e2692c9
test(policy): enforce admin bypass and non-admin block for target use…
vitormattos Mar 27, 2026
0a3088e
feat(policy): initialize real workbench view mode from actor role
vitormattos Mar 27, 2026
e464b6b
fix(policy): hide blocked user create option for group-admin dialog
vitormattos Mar 27, 2026
b7dd3ff
feat(policy): expose current actor admin check in context factory
vitormattos Mar 27, 2026
e032323
fix(policy): allow instance-admin override for target user policy save
vitormattos Mar 27, 2026
2a5469a
feat(policy): promote create rule as primary toolbar action
vitormattos Mar 27, 2026
08c9889
refactor(policy): make scope selection immediate and remove pending s…
vitormattos Mar 29, 2026
1545845
fix(policy): reset scope selection when opening or closing create dialog
vitormattos Mar 29, 2026
ae272df
fix(policy): suppress browser auto-focus ring on scope selection cards
vitormattos Mar 29, 2026
23c5687
fix(policy): fully reset card visuals on programmatic focus to preven…
vitormattos Mar 29, 2026
eb363d5
fix(policy): preserve hover on auto-focused first scope option
vitormattos Mar 29, 2026
f1da08a
feat(policy): improve signing-order rule management copy and hierarch…
vitormattos Mar 29, 2026
ae35d71
test(policy): update signing-order workbench copy expectations
vitormattos Mar 29, 2026
de60253
feat(policy): add scope icons to rule filter menu
vitormattos Mar 29, 2026
65f3235
fix(policy): hide instance option when default rule already exists
vitormattos Mar 29, 2026
6a4142e
test(policy): scope create-rule assertions to modal content
vitormattos Mar 29, 2026
de7daba
feat(policy): require explicit signing flow selection before save
vitormattos Mar 29, 2026
9f97492
feat(policy): start signing flow editor with neutral unselected state
vitormattos Mar 29, 2026
11d32ef
feat(policy): clarify signing order hierarchy and behavior wording
vitormattos Mar 29, 2026
97e80d0
feat(policy): add precedence hint to rule editor panel
vitormattos Mar 29, 2026
b40cbe5
test(policy): cover unselected initial state in scalar flow editor
vitormattos Mar 29, 2026
a87a13d
test(policy): enforce explicit flow selection in workbench drafts
vitormattos Mar 29, 2026
1e84fa1
fix(policy): normalize signing-order table typography
vitormattos Mar 29, 2026
c04dce4
fix(policy): close rule actions menu before opening editor
vitormattos Mar 29, 2026
533591c
fix(policy): remove bold emphasis from enforced behavior
vitormattos Mar 29, 2026
d18728e
fix(policy): persist explicit signature flow default source
vitormattos Mar 29, 2026
dbd3def
test(policy): cover explicit signature flow default persistence
vitormattos Mar 29, 2026
1929e70
fix(policy-workbench): keep explicit instance default state
vitormattos Mar 29, 2026
eb7bdb4
refactor(policy-workbench): align signature flow labels
vitormattos Mar 29, 2026
4ff3d7d
refactor(policy-workbench): normalize signing order naming
vitormattos Mar 29, 2026
17175d5
refactor(policy-workbench): streamline settings workbench wrapper
vitormattos Mar 29, 2026
a0a692f
feat(policy-workbench): simplify signing order header and feedback
vitormattos Mar 29, 2026
ad81bb2
test(policy-workbench): add regressions for explicit default visibility
vitormattos Mar 29, 2026
99e5836
test(policy-workbench): cover simplified signing order summary ui
vitormattos Mar 29, 2026
8c0e43a
test(e2e): validate instance signature flow create/remove lifecycle
vitormattos Mar 29, 2026
cd6f840
fix(policy-workbench): align default removal messaging with system cu…
vitormattos Mar 29, 2026
58fa4ff
refactor(policy-workbench): rename legacy global default copy to inst…
vitormattos Mar 29, 2026
c337289
refactor(policy-workbench): align signing order legacy scope labels
vitormattos Mar 29, 2026
a3062e6
refactor(policy-workbench): standardize instance default wording
vitormattos Mar 29, 2026
195b32a
test(policy-workbench): update editor title expectation for instance …
vitormattos Mar 29, 2026
63425f0
fix(settings-nav): prevent duplicated sidebar icons and diversify glyphs
vitormattos Mar 29, 2026
a61cb14
test(settings-nav): cover custom icon-slot without fallback icon prop
vitormattos Mar 29, 2026
babb91e
test(integration): stabilize signature flow policy api scenario
vitormattos Mar 30, 2026
806fdb2
test(e2e): rewrite policy workbench persistence spec for current UI
vitormattos Mar 30, 2026
521d1f5
test(e2e): stabilize policy workbench persistence selectors
vitormattos Mar 30, 2026
8d37c5b
refactor(PolicyRuleEditorPanel): remove duplicate title from editor h…
vitormattos Mar 31, 2026
1d9bd4c
style(RealPolicyWorkbench): align editor action buttons right in hori…
vitormattos Mar 31, 2026
16888ab
test(SettingsPolicyWorkbench): update editor test for removed duplica…
vitormattos Mar 31, 2026
36dfaf3
refactor(SignatureFlowScalarRuleEditor): clarify sequential signing m…
vitormattos Mar 31, 2026
27408ae
style(RealPolicyWorkbench): remove border and background from editor …
vitormattos Mar 31, 2026
d6ce2d7
fix(PolicyRuleEditorPanel): force horizontal modal actions and remove…
vitormattos Mar 31, 2026
315c729
refactor(PolicyRuleEditorPanel): allow dialog-managed footer actions
vitormattos Mar 31, 2026
d10a5ad
refactor(RealPolicyWorkbench): use NcDialog native footer buttons
vitormattos Mar 31, 2026
77705ce
test(SettingsPolicyWorkbench): assert NcDialog footer action behavior
vitormattos Mar 31, 2026
e3752ae
fix(RealPolicyWorkbench): keep create flow responsive after first rule
vitormattos Mar 31, 2026
a1a978e
test(SettingsPolicyWorkbench): cover create-after-save regression flow
vitormattos Mar 31, 2026
2547126
fix(RealPolicyWorkbench): hide Instance option when default already e…
vitormattos Mar 31, 2026
ae273e3
test(SettingsPolicyWorkbench): update create-scope expectations for I…
vitormattos Mar 31, 2026
17c91f2
fix(RealPolicyWorkbench): close create-scope state after successful save
vitormattos Mar 31, 2026
a86e8a4
test(SettingsPolicyWorkbench): align stubs and assertions with create…
vitormattos Mar 31, 2026
ecccde8
fix(useRealPolicyWorkbench): enforce user-only targets in user rule p…
vitormattos Mar 31, 2026
4b4197f
test(useRealPolicyWorkbench): ignore group-like records in user targets
vitormattos Mar 31, 2026
95fcc27
fix(useRealPolicyWorkbench): keep instance row after reload for syste…
vitormattos Mar 31, 2026
3fa15d5
test(useRealPolicyWorkbench): assert visible instance row for system …
vitormattos Mar 31, 2026
99e5cfe
fix(RealPolicyWorkbench): close scope filter menu on select, mark act…
vitormattos Apr 1, 2026
e52066a
refactor(types): add policy response definitions
vitormattos Apr 1, 2026
22cd6d8
refactor(types): add explicit policy state types
vitormattos Apr 1, 2026
104f345
feat(api): expose explicit system and user policies
vitormattos Apr 1, 2026
589d02f
feat(policy): fetch explicit system and user rules
vitormattos Apr 1, 2026
298e581
fix(signature-flow): refresh stored policy snapshots
vitormattos Apr 1, 2026
ae97425
feat(store): fetch explicit system and user policies
vitormattos Apr 1, 2026
7680e79
fix(store): omit locked signature flow overrides
vitormattos Apr 1, 2026
d8c51cc
fix(ui): enforce fixed signature flow policies
vitormattos Apr 1, 2026
32fa45f
feat(policy-workbench): hydrate rules and lock signature flow overrides
vitormattos Apr 1, 2026
0bfe011
refactor(ui): streamline policy workbench layout
vitormattos Apr 1, 2026
b48acf6
refactor(ui): simplify policy rule editor guidance
vitormattos Apr 1, 2026
10502bb
style(ui): refine signature flow option layout
vitormattos Apr 1, 2026
6aca091
test(unit): cover signature flow policy snapshots
vitormattos Apr 1, 2026
e251467
test(unit): cover explicit policy fetches
vitormattos Apr 1, 2026
1f0eb6b
test(unit): cover locked signature flow payloads
vitormattos Apr 1, 2026
27001bd
test(unit): cover fixed signature flow sidebar behavior
vitormattos Apr 1, 2026
98b4676
test(unit): cover persisted policy hydration
vitormattos Apr 1, 2026
4cb008d
test(unit): update policy workbench ui expectations
vitormattos Apr 1, 2026
578b4e1
test(e2e): harden policy workbench persistence flow
vitormattos Apr 1, 2026
b6bac28
test(e2e): cover fixed signature flow request sidebar
vitormattos Apr 1, 2026
304a2e6
fix: lock signature flow workbench overrides
vitormattos Apr 1, 2026
c0a062e
test: cover fixed parallel policy workbench
vitormattos Apr 1, 2026
d6cbdfc
test: cover fixed parallel signature flow sidebar
vitormattos Apr 1, 2026
5eb006e
test(policy): cover target user policy service
vitormattos Apr 1, 2026
c56d882
test(policy): cover target user policy controller
vitormattos Apr 1, 2026
5c82440
fix(policy): persist target user policy layer
vitormattos Apr 1, 2026
9834c22
fix(policy): return target user policy payload
vitormattos Apr 1, 2026
2b29dd7
chore(api): add target user policy write type
vitormattos Apr 1, 2026
acc7e77
test(policy): cover target user policy store
vitormattos Apr 1, 2026
e157c2f
fix(policy): consume target user policy payload
vitormattos Apr 1, 2026
62e675d
chore(openapi): regenerate administration spec
vitormattos Apr 1, 2026
dce66e9
chore(openapi): regenerate full spec
vitormattos Apr 1, 2026
7fdfc97
chore(openapi): regenerate administration types
vitormattos Apr 1, 2026
4207f47
chore(openapi): regenerate full types
vitormattos Apr 1, 2026
f56b28c
test(policy): stabilize workbench persistence e2e
vitormattos Apr 1, 2026
c4352b3
test(signature-flow): stabilize request sidebar e2e
vitormattos Apr 1, 2026
b20b423
test(reminder): stabilize reminder action e2e
vitormattos Apr 1, 2026
e049a9f
test: align admin policy response assertions
vitormattos Apr 1, 2026
891535d
test: isolate guest signature element scenario
vitormattos Apr 1, 2026
ad79796
fix: remove policy controller 500 mapping
vitormattos Apr 2, 2026
a72b221
test: cover policy controller exception bubbling
vitormattos Apr 2, 2026
d552773
fix: align system policy error type
vitormattos Apr 2, 2026
ecbffff
build: regenerate openapi spec
vitormattos Apr 2, 2026
68cf348
build: regenerate administration openapi spec
vitormattos Apr 2, 2026
10f1bf2
build: regenerate full openapi spec
vitormattos Apr 2, 2026
c046339
build: regenerate openapi types
vitormattos Apr 2, 2026
775ac92
build: regenerate administration openapi types
vitormattos Apr 2, 2026
62b2c07
build: regenerate full openapi types
vitormattos Apr 2, 2026
6335c36
test: cover policy workbench compact view config
vitormattos Apr 2, 2026
98412fb
test: drop brittle admin initial state unit test
vitormattos Apr 2, 2026
4e6403f
test: expand admin initial state integration coverage
vitormattos Apr 2, 2026
807e409
test: drop migration unit test
vitormattos Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions lib/Command/Developer/Reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ protected function configure(): void {
mode: InputOption::VALUE_NONE,
description: 'Reset config'
)
->addOption(
name: 'policy',
shortcut: null,
mode: InputOption::VALUE_NONE,
description: 'Reset policy data'
)
;
}

Expand Down Expand Up @@ -140,6 +146,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$this->resetConfig();
$ok = true;
}
if ($input->getOption('policy') || $all) {
$this->resetPolicy();
$ok = true;
}
} catch (\Exception $e) {
$this->logger->error($e->getMessage());
throw $e;
Expand Down Expand Up @@ -254,4 +264,17 @@ private function resetConfig(): void {
} catch (\Throwable) {
}
}

private function resetPolicy(): void {
try {
$delete = $this->db->getQueryBuilder();
$delete->delete('libresign_permission_set_binding')
->executeStatement();

$delete = $this->db->getQueryBuilder();
$delete->delete('libresign_permission_set')
->executeStatement();
} catch (\Throwable) {
}
}
}
29 changes: 8 additions & 21 deletions lib/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use OCA\Libresign\Service\IdentifyMethodService;
use OCA\Libresign\Service\Install\ConfigureCheckService;
use OCA\Libresign\Service\Install\InstallService;
use OCA\Libresign\Service\Policy\PolicyService;
use OCA\Libresign\Service\ReminderService;
use OCA\Libresign\Service\SignatureBackgroundService;
use OCA\Libresign\Service\SignatureTextService;
Expand Down Expand Up @@ -83,6 +84,7 @@ public function __construct(
private ReminderService $reminderService,
private FooterService $footerService,
private DocMdpConfigService $docMdpConfigService,
private PolicyService $policyService,
private IdentifyMethodService $identifyMethodService,
private FileMapper $fileMapper,
) {
Expand Down Expand Up @@ -974,36 +976,21 @@ private function saveOrDeleteConfig(string $key, ?string $value, string $default
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/admin/signature-flow/config', requirements: ['apiVersion' => '(v1)'])]
public function setSignatureFlowConfig(bool $enabled, ?string $mode = null): DataResponse {
try {
if (!$enabled) {
$this->appConfig->deleteKey(Application::APP_ID, 'signature_flow');
return new DataResponse([
'message' => $this->l10n->t('Settings saved'),
]);
}

if ($mode === null) {
if ($enabled && $mode === null) {
return new DataResponse([
'error' => $this->l10n->t('Mode is required when signature flow is enabled.'),
], Http::STATUS_BAD_REQUEST);
}

try {
$signatureFlow = \OCA\Libresign\Enum\SignatureFlow::from($mode);
} catch (\ValueError) {
return new DataResponse([
'error' => $this->l10n->t('Invalid signature flow mode. Use "parallel" or "ordered_numeric".'),
], Http::STATUS_BAD_REQUEST);
}

$this->appConfig->setValueString(
Application::APP_ID,
'signature_flow',
$signatureFlow->value
);
$this->policyService->saveSystem('signature_flow', $enabled ? $mode : null);

return new DataResponse([
'message' => $this->l10n->t('Settings saved'),
]);
} catch (\InvalidArgumentException) {
return new DataResponse([
'error' => $this->l10n->t('Invalid signature flow mode. Use "parallel" or "ordered_numeric".'),
], Http::STATUS_BAD_REQUEST);
} catch (\Exception $e) {
return new DataResponse([
'error' => $e->getMessage(),
Expand Down
10 changes: 9 additions & 1 deletion lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use OCA\Libresign\Service\FileService;
use OCA\Libresign\Service\IdentifyMethod\SignatureMethod\TokenService;
use OCA\Libresign\Service\IdentifyMethodService;
use OCA\Libresign\Service\Policy\PolicyService;
use OCA\Libresign\Service\RequestSignatureService;
use OCA\Libresign\Service\SessionService;
use OCA\Libresign\Service\SignerElementsService;
Expand Down Expand Up @@ -58,6 +59,7 @@ public function __construct(
private AccountService $accountService,
protected SignFileService $signFileService,
protected RequestSignatureService $requestSignatureService,
private PolicyService $policyService,
private SignerElementsService $signerElementsService,
protected IL10N $l10n,
private IdentifyMethodService $identifyMethodService,
Expand Down Expand Up @@ -106,7 +108,13 @@ public function index(): TemplateResponse {

$this->provideSignerSignatues();
$this->initialState->provideInitialState('identify_methods', $this->identifyMethodService->getIdentifyMethodsSettings());
$this->initialState->provideInitialState('signature_flow', $this->appConfig->getValueString(Application::APP_ID, 'signature_flow', \OCA\Libresign\Enum\SignatureFlow::NONE->value));
$resolvedPolicies = [];
foreach ($this->policyService->resolveKnownPolicies() as $policyKey => $resolvedPolicy) {
$resolvedPolicies[$policyKey] = $resolvedPolicy->toArray();
}
$this->initialState->provideInitialState('effective_policies', [
'policies' => $resolvedPolicies,
]);
$this->initialState->provideInitialState('docmdp_config', $this->docMdpConfigService->getConfig());
$this->initialState->provideInitialState('legal_information', $this->appConfig->getValueString(Application::APP_ID, 'legal_information'));

Expand Down
Loading
Loading