Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
282 commits
Select commit Hold shift + click to select a range
b483ade
test: cover sidebar policy bootstrap
vitormattos Mar 18, 2026
a212a85
test: cover request sidebar policy bootstrap
vitormattos Mar 18, 2026
6d34b4f
refactor(policy): restructure generic policy runtime
vitormattos Mar 18, 2026
1e9a28f
fix(policy): enforce request signature flow resolution
vitormattos Mar 18, 2026
ac99f9a
test(policy): realign policy runtime coverage
vitormattos Mar 18, 2026
325c39f
fix(migration): reference permission set table in foreign key
vitormattos Mar 18, 2026
5be976a
fix(openapi): declare validate metadata policy snapshot
vitormattos Mar 18, 2026
a29a003
chore(openapi): regenerate validate metadata schema
vitormattos Mar 18, 2026
cf2a702
chore(openapi): regenerate full validate metadata schema
vitormattos Mar 18, 2026
269afbe
chore(types): regenerate openapi validate metadata types
vitormattos Mar 18, 2026
5512b5b
chore(types): regenerate full openapi validate metadata types
vitormattos Mar 18, 2026
08b7403
test(vitest): lazy load l10n helper mock
vitormattos Mar 18, 2026
0b02b20
feat(policy): add effective policies controller
vitormattos Mar 18, 2026
b8b036b
feat(policy): resolve known policies bootstrap
vitormattos Mar 18, 2026
7848392
refactor(policy): type effective policy responses
vitormattos Mar 18, 2026
12d8a82
refactor(page): bootstrap effective policies state
vitormattos Mar 18, 2026
95182b5
refactor(files): load effective policies bootstrap
vitormattos Mar 18, 2026
bdbf0f2
test(policy): cover effective policies controller
vitormattos Mar 18, 2026
97fbc69
test(files): cover effective policies bootstrap
vitormattos Mar 18, 2026
16e62a0
docs(openapi): add policy bootstrap schema
vitormattos Mar 18, 2026
523541c
docs(openapi): add full policy bootstrap schema
vitormattos Mar 18, 2026
42d7997
refactor(types): generate policy bootstrap api types
vitormattos Mar 18, 2026
aff3d28
refactor(types): generate full policy api types
vitormattos Mar 18, 2026
2bcc56f
refactor(types): use generated effective policy aliases
vitormattos Mar 18, 2026
d9c2077
feat(store): add effective policies store
vitormattos Mar 18, 2026
a5a65d2
test(store): cover effective policies store
vitormattos Mar 18, 2026
8b547cf
refactor(sidebar): consume effective policies store
vitormattos Mar 18, 2026
7a3e1e6
test(sidebar): cover effective policy bootstrap
vitormattos Mar 18, 2026
fa2e506
refactor(policy): add persistence hooks to policy source
vitormattos Mar 18, 2026
2e2feef
feat(policy): persist system and user policy values
vitormattos Mar 18, 2026
79fab29
feat(policy): add policy save operations
vitormattos Mar 18, 2026
678feed
refactor(policy): add policy write response types
vitormattos Mar 18, 2026
dbfe017
feat(policy): add policy write endpoints
vitormattos Mar 18, 2026
5058242
refactor(admin): route signature flow config through policy service
vitormattos Mar 18, 2026
1f6ef23
refactor(settings): bootstrap effective policies in admin
vitormattos Mar 18, 2026
68ddd99
docs(openapi): add admin policy write schema
vitormattos Mar 18, 2026
86b31f8
docs(openapi): add user policy preference schema
vitormattos Mar 18, 2026
78bf34c
docs(openapi): add full policy preference schema
vitormattos Mar 18, 2026
e7058c8
refactor(types): add policy write api aliases
vitormattos Mar 18, 2026
44e720f
refactor(types): generate admin policy write types
vitormattos Mar 18, 2026
3b4b1f4
refactor(types): generate policy preference types
vitormattos Mar 18, 2026
69862d9
refactor(types): generate full policy preference types
vitormattos Mar 18, 2026
d668268
feat(store): persist policy preferences
vitormattos Mar 18, 2026
dab7df1
refactor(settings): use policy store in signature flow
vitormattos Mar 18, 2026
23bd794
test(settings): cover generic signature flow settings
vitormattos Mar 18, 2026
b3e47b0
feat(sidebar): persist signature flow user default
vitormattos Mar 18, 2026
d6f364f
test(sidebar): cover signature flow preference persistence
vitormattos Mar 18, 2026
95be212
test(store): cover policy preference persistence
vitormattos Mar 18, 2026
1b0bfcf
test(policy): cover policy write controller
vitormattos Mar 18, 2026
d170c7a
test(policy): cover policy source persistence
vitormattos Mar 18, 2026
18a3b43
test(policy): update policy source test double
vitormattos Mar 18, 2026
2ca83ce
refactor(files-list): simplify virtual list component
vitormattos Mar 18, 2026
117aed3
fix(policies): correct typescript types and method signatures in useR…
vitormattos Mar 19, 2026
0147845
refactor(views): integrate RealPolicyWorkbench in Settings view
vitormattos Mar 19, 2026
3a78d23
feat(policies): create RealPolicyWorkbench component with full UI
vitormattos Mar 19, 2026
be01122
test(policies): add comprehensive test for RealPolicyWorkbench component
vitormattos Mar 19, 2026
217b5db
fix(policy-workbench): close editor when removing edited rule
vitormattos Mar 20, 2026
166f971
feat(policy-workbench): add reset feedback and post-remove UX flow
vitormattos Mar 20, 2026
0652434
test(policy-workbench): cover editor close on rule reset and removal
vitormattos Mar 20, 2026
feeeb8f
feat(Controller): implement PolicyController behavior
vitormattos Mar 20, 2026
3450a0c
feat(lib): implement ResponseDefinitions behavior
vitormattos Mar 20, 2026
bd608f0
feat(Contract): implement IPolicySource behavior
vitormattos Mar 20, 2026
9df3635
feat(Policy): implement PolicyService behavior
vitormattos Mar 20, 2026
8e3a635
feat(Runtime): implement PolicySource behavior
vitormattos Mar 20, 2026
484a3ff
chore(repo): refresh openapi-administration behavior
vitormattos Mar 20, 2026
4707196
chore(repo): refresh openapi-full behavior
vitormattos Mar 20, 2026
f3d469b
feat(store): implement policies behavior
vitormattos Mar 20, 2026
51a9d2a
test(tests): cover setup behavior
vitormattos Mar 20, 2026
3352d29
test(store): cover policies.spec behavior
vitormattos Mar 20, 2026
a1985a4
test(Settings): cover Settings.spec behavior
vitormattos Mar 20, 2026
0570a15
test(Settings): cover SettingsPolicyWorkbench.spec behavior
vitormattos Mar 20, 2026
b003563
feat(types): implement index behavior
vitormattos Mar 20, 2026
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
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