Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
415 commits
Select commit Hold shift + click to select a range
0ba1d5b
feat(account): allow subadmins to manage group policies
vitormattos Mar 20, 2026
d4ed409
test(account): cover subadmin group policy capability
vitormattos Mar 20, 2026
39a20f3
feat(policy-workbench): hydrate persisted group policies on open
vitormattos Mar 20, 2026
6f84386
test(policy-workbench): verify persisted group rule hydration
vitormattos Mar 20, 2026
982cf2f
fix(types): use policy group operations from api schema
vitormattos Mar 20, 2026
b68853e
test(playwright): add group and subadmin provisioning helpers
vitormattos Mar 20, 2026
28054e3
test(playwright): reset session before provisioning login
vitormattos Mar 20, 2026
db86c8c
test(e2e): add personas permissions scenario for policy workbench
vitormattos Mar 20, 2026
63f59c6
chore(test): normalize eof newline in preferences spec
vitormattos Mar 20, 2026
14e1ee1
chore(policies): normalize eof newline in policies view
vitormattos Mar 20, 2026
8e58e48
chore(preferences): normalize eof newline in preferences view
vitormattos Mar 20, 2026
ca39f2a
fix: reset policy tables in developer reset
vitormattos Mar 20, 2026
7113224
test: cleanup policy state in admin policies feature
vitormattos Mar 20, 2026
a2b2f68
test: use post cleanup for system signature_flow policy
vitormattos Mar 20, 2026
e636621
refactor(policy): namespace signature_flow system config key
vitormattos Mar 20, 2026
3f51dc2
feat(migration): migrate legacy signature_flow policy keys
vitormattos Mar 20, 2026
089896f
fix(policy): disable circle layer in signature_flow phase
vitormattos Mar 20, 2026
02bfc1f
test(policy): update source expectations for namespaced key
vitormattos Mar 20, 2026
9cb5a87
test(migration): cover signature_flow legacy key migration
vitormattos Mar 20, 2026
00f3214
docs(api): align signatureFlow param with policy resolver
vitormattos Mar 20, 2026
1d65442
chore(openapi): regenerate openapi json
vitormattos Mar 20, 2026
40c585d
chore(openapi): regenerate openapi full json
vitormattos Mar 20, 2026
815241e
chore(openapi): regenerate openapi types
vitormattos Mar 20, 2026
3996361
chore(openapi): regenerate openapi full types
vitormattos Mar 20, 2026
6751830
test(policy): assert circle layer is ignored in phase 1
vitormattos Mar 20, 2026
cad71d8
feat(policy): add resolution mode to policy definition contract
vitormattos Mar 23, 2026
af9ae48
feat(policy): support resolution mode in policy spec
vitormattos Mar 23, 2026
9effc75
feat(policy): classify signature flow as value choice
vitormattos Mar 23, 2026
6575438
feat(policy): resolve group value-choice layers by union
vitormattos Mar 23, 2026
f48ff9c
test(policy): cover policy spec resolution mode
vitormattos Mar 23, 2026
8a947b4
test(policy): cover signature flow value-choice resolution
vitormattos Mar 23, 2026
1e54e73
test(e2e): cover signature flow persistence in request sidebar
vitormattos Mar 23, 2026
fcc4814
feat(workbench): simplify policy workbench UI with single-column layo…
vitormattos Mar 23, 2026
6bd543c
feat(workbench): enhance policy state with sticky summary and resolut…
vitormattos Mar 23, 2026
0204125
test(workbench): add comprehensive tests for policy state and sticky …
vitormattos Mar 23, 2026
b628276
test(workbench): format spec file after component refactoring
vitormattos Mar 23, 2026
0b12c52
fix(workbench): guard editor draft access and restore mobile dialog w…
vitormattos Mar 23, 2026
f396503
feat(workbench): switch exceptions UI to scalable tabs and tables
vitormattos Mar 23, 2026
f9d6bd5
refactor(workbench): tighten visual hierarchy and table scanability
vitormattos Mar 23, 2026
2a992be
refactor(workbench): polish summary and table usability details
vitormattos Mar 23, 2026
2943a60
refactor(workbench): adopt nextcloud actions and clean top workspace
vitormattos Mar 23, 2026
efa67de
refactor(workbench): add action icons and stabilize inheritance help …
vitormattos Mar 23, 2026
7a7b070
fix(workbench): keep inheritance help inside summary card context
vitormattos Mar 23, 2026
66b1b0e
refactor(workbench): simplify UI hierarchy - remove banner, use plain…
vitormattos Mar 23, 2026
8289ab2
fix(policy): refresh UI state after saving policies
vitormattos Mar 23, 2026
f386ef5
refactor(policy): unify rule management in single CRUD table
vitormattos Mar 23, 2026
91a71e4
fix(policy): disable create action when selected scope is blocked
vitormattos Mar 24, 2026
5358aab
test(policy): cover numeric system value in global editor
vitormattos Mar 24, 2026
6d00098
fix(policy): normalize numeric global rule values on edit
vitormattos Mar 24, 2026
d95e659
test(policy): cover create rule blocked when no system rule set
vitormattos Mar 24, 2026
1def0f7
fix(policy): block create rule only when allowChildOverride is explic…
vitormattos Mar 24, 2026
3d070de
test(policy): cover scope-driven create flow and empty global default…
vitormattos Mar 24, 2026
44e1aa7
refactor(policy): extract shared rule editor panel component
vitormattos Mar 24, 2026
270788e
feat(policy): simplify workbench create flow and discard confirmation UX
vitormattos Mar 24, 2026
f929978
test(policy): cover decoupled create scope from rule filter
vitormattos Mar 24, 2026
e355150
fix(policy): separate create scope control from scope filter
vitormattos Mar 24, 2026
45a8154
test(policy): cover create scope prompt dialog flow
vitormattos Mar 24, 2026
7f745fb
feat(policy): ask create scope through prompt dialog
vitormattos Mar 24, 2026
c583836
test(policy): cover explicit scope filter labeling
vitormattos Mar 24, 2026
98f97fd
fix(policy): label scope radios as table filter
vitormattos Mar 24, 2026
b8c0a6c
test(policy): cover files-style filter entrypoint in workbench
vitormattos Mar 24, 2026
9def3f5
feat(policy): adopt files-style scope filters with popover and chips
vitormattos Mar 24, 2026
687cad3
test(policy): assert compact workbench header copy
vitormattos Mar 24, 2026
fdc3f48
feat(policy): tighten workbench header layout and copy
vitormattos Mar 24, 2026
ac0de1d
test(policy): cover app-navigation search actions in workbench
vitormattos Mar 27, 2026
008a6c0
feat(policy): use app navigation search for rule toolbar
vitormattos Mar 27, 2026
ae3921a
fix(policy): keep toolbar actions visible while searching
vitormattos Mar 27, 2026
0a776b6
test(policy): cover role-specific user override behavior in real work…
vitormattos Mar 27, 2026
aaf347a
test(policy): map blocked target-user policy save to bad request
vitormattos Mar 27, 2026
551c276
test(policy): enforce admin bypass and non-admin block for target use…
vitormattos Mar 27, 2026
d6dc21c
feat(policy): initialize real workbench view mode from actor role
vitormattos Mar 27, 2026
0b25bb9
fix(policy): hide blocked user create option for group-admin dialog
vitormattos Mar 27, 2026
9cd0577
feat(policy): expose current actor admin check in context factory
vitormattos Mar 27, 2026
c9b83f6
fix(policy): allow instance-admin override for target user policy save
vitormattos Mar 27, 2026
d7a0d1d
feat(policy): promote create rule as primary toolbar action
vitormattos Mar 27, 2026
7d50bf2
refactor(policy): make scope selection immediate and remove pending s…
vitormattos Mar 29, 2026
34c3069
fix(policy): reset scope selection when opening or closing create dialog
vitormattos Mar 29, 2026
fd782f1
fix(policy): suppress browser auto-focus ring on scope selection cards
vitormattos Mar 29, 2026
f1891da
fix(policy): fully reset card visuals on programmatic focus to preven…
vitormattos Mar 29, 2026
7c0bf70
fix(policy): preserve hover on auto-focused first scope option
vitormattos Mar 29, 2026
755587e
feat(policy): improve signing-order rule management copy and hierarch…
vitormattos Mar 29, 2026
98f869e
test(policy): update signing-order workbench copy expectations
vitormattos Mar 29, 2026
305a75d
feat(policy): add scope icons to rule filter menu
vitormattos Mar 29, 2026
4dca1d1
fix(policy): hide instance option when default rule already exists
vitormattos Mar 29, 2026
74885c2
test(policy): scope create-rule assertions to modal content
vitormattos Mar 29, 2026
63455f2
feat(policy): require explicit signing flow selection before save
vitormattos Mar 29, 2026
2ac6766
feat(policy): start signing flow editor with neutral unselected state
vitormattos Mar 29, 2026
ba1f00d
feat(policy): clarify signing order hierarchy and behavior wording
vitormattos Mar 29, 2026
6ab084a
feat(policy): add precedence hint to rule editor panel
vitormattos Mar 29, 2026
2f9abf6
test(policy): cover unselected initial state in scalar flow editor
vitormattos Mar 29, 2026
dd7741a
test(policy): enforce explicit flow selection in workbench drafts
vitormattos Mar 29, 2026
d19b870
fix(policy): normalize signing-order table typography
vitormattos Mar 29, 2026
b22813b
fix(policy): close rule actions menu before opening editor
vitormattos Mar 29, 2026
389af22
fix(policy): remove bold emphasis from enforced behavior
vitormattos Mar 29, 2026
6705674
fix(policy): persist explicit signature flow default source
vitormattos Mar 29, 2026
cbe70e5
test(policy): cover explicit signature flow default persistence
vitormattos Mar 29, 2026
b355a99
fix(policy-workbench): keep explicit instance default state
vitormattos Mar 29, 2026
cba9ccc
refactor(policy-workbench): align signature flow labels
vitormattos Mar 29, 2026
12fdea3
refactor(policy-workbench): normalize signing order naming
vitormattos Mar 29, 2026
c722016
refactor(policy-workbench): streamline settings workbench wrapper
vitormattos Mar 29, 2026
e86ab29
feat(policy-workbench): simplify signing order header and feedback
vitormattos Mar 29, 2026
b9b2d57
test(policy-workbench): add regressions for explicit default visibility
vitormattos Mar 29, 2026
886ea5c
test(policy-workbench): cover simplified signing order summary ui
vitormattos Mar 29, 2026
9f69cff
test(e2e): validate instance signature flow create/remove lifecycle
vitormattos Mar 29, 2026
f42e220
fix(policy-workbench): align default removal messaging with system cu…
vitormattos Mar 29, 2026
3e721c8
refactor(policy-workbench): rename legacy global default copy to inst…
vitormattos Mar 29, 2026
f812c0a
refactor(policy-workbench): align signing order legacy scope labels
vitormattos Mar 29, 2026
5edf552
refactor(policy-workbench): standardize instance default wording
vitormattos Mar 29, 2026
9abcc7c
test(policy-workbench): update editor title expectation for instance …
vitormattos Mar 29, 2026
d4b0580
fix(settings-nav): prevent duplicated sidebar icons and diversify glyphs
vitormattos Mar 29, 2026
6d08235
test(settings-nav): cover custom icon-slot without fallback icon prop
vitormattos Mar 29, 2026
8258df3
test(integration): stabilize signature flow policy api scenario
vitormattos Mar 30, 2026
c8bd263
test(e2e): rewrite policy workbench persistence spec for current UI
vitormattos Mar 30, 2026
c4790ff
test(e2e): stabilize policy workbench persistence selectors
vitormattos Mar 30, 2026
dbb892a
refactor(PolicyRuleEditorPanel): remove duplicate title from editor h…
vitormattos Mar 31, 2026
22f05cb
style(RealPolicyWorkbench): align editor action buttons right in hori…
vitormattos Mar 31, 2026
8483102
test(SettingsPolicyWorkbench): update editor test for removed duplica…
vitormattos Mar 31, 2026
ba817bf
refactor(SignatureFlowScalarRuleEditor): clarify sequential signing m…
vitormattos Mar 31, 2026
c70f07e
style(RealPolicyWorkbench): remove border and background from editor …
vitormattos Mar 31, 2026
1252947
fix(PolicyRuleEditorPanel): force horizontal modal actions and remove…
vitormattos Mar 31, 2026
b958e91
refactor(PolicyRuleEditorPanel): allow dialog-managed footer actions
vitormattos Mar 31, 2026
4a0bf2d
refactor(RealPolicyWorkbench): use NcDialog native footer buttons
vitormattos Mar 31, 2026
7a396cc
test(SettingsPolicyWorkbench): assert NcDialog footer action behavior
vitormattos Mar 31, 2026
6671545
fix(RealPolicyWorkbench): keep create flow responsive after first rule
vitormattos Mar 31, 2026
5caf07b
test(SettingsPolicyWorkbench): cover create-after-save regression flow
vitormattos Mar 31, 2026
f516621
fix(RealPolicyWorkbench): hide Instance option when default already e…
vitormattos Mar 31, 2026
2b738ff
test(SettingsPolicyWorkbench): update create-scope expectations for I…
vitormattos Mar 31, 2026
79b4b42
fix(RealPolicyWorkbench): close create-scope state after successful save
vitormattos Mar 31, 2026
dc8bd11
test(SettingsPolicyWorkbench): align stubs and assertions with create…
vitormattos Mar 31, 2026
06351e4
fix(useRealPolicyWorkbench): enforce user-only targets in user rule p…
vitormattos Mar 31, 2026
6567ad2
test(useRealPolicyWorkbench): ignore group-like records in user targets
vitormattos Mar 31, 2026
11cb42a
fix(useRealPolicyWorkbench): keep instance row after reload for syste…
vitormattos Mar 31, 2026
f65071d
test(useRealPolicyWorkbench): assert visible instance row for system …
vitormattos Mar 31, 2026
9d96533
fix(RealPolicyWorkbench): close scope filter menu on select, mark act…
vitormattos Apr 1, 2026
88440dc
refactor(types): add policy response definitions
vitormattos Apr 1, 2026
01146eb
refactor(types): add explicit policy state types
vitormattos Apr 1, 2026
0bdb01e
feat(api): expose explicit system and user policies
vitormattos Apr 1, 2026
7129738
feat(policy): fetch explicit system and user rules
vitormattos Apr 1, 2026
b273bd8
fix(signature-flow): refresh stored policy snapshots
vitormattos Apr 1, 2026
4f90576
feat(store): fetch explicit system and user policies
vitormattos Apr 1, 2026
5d1ea56
fix(store): omit locked signature flow overrides
vitormattos Apr 1, 2026
c5573c3
fix(ui): enforce fixed signature flow policies
vitormattos Apr 1, 2026
2728a59
feat(policy-workbench): hydrate rules and lock signature flow overrides
vitormattos Apr 1, 2026
6010612
refactor(ui): streamline policy workbench layout
vitormattos Apr 1, 2026
b8a5f42
refactor(ui): simplify policy rule editor guidance
vitormattos Apr 1, 2026
0252b9e
style(ui): refine signature flow option layout
vitormattos Apr 1, 2026
6a17fd9
test(unit): cover signature flow policy snapshots
vitormattos Apr 1, 2026
910b65d
test(unit): cover explicit policy fetches
vitormattos Apr 1, 2026
94711ef
test(unit): cover locked signature flow payloads
vitormattos Apr 1, 2026
ee3dcfa
test(unit): cover fixed signature flow sidebar behavior
vitormattos Apr 1, 2026
899a799
test(unit): cover persisted policy hydration
vitormattos Apr 1, 2026
946ed47
test(unit): update policy workbench ui expectations
vitormattos Apr 1, 2026
8482350
test(e2e): harden policy workbench persistence flow
vitormattos Apr 1, 2026
11437fd
test(e2e): cover fixed signature flow request sidebar
vitormattos Apr 1, 2026
3388d16
fix: lock signature flow workbench overrides
vitormattos Apr 1, 2026
c6def56
test: cover fixed parallel policy workbench
vitormattos Apr 1, 2026
e60f458
test: cover fixed parallel signature flow sidebar
vitormattos Apr 1, 2026
43f5a82
test(policy): cover target user policy service
vitormattos Apr 1, 2026
c0bede7
test(policy): cover target user policy controller
vitormattos Apr 1, 2026
267113e
fix(policy): persist target user policy layer
vitormattos Apr 1, 2026
b23748f
fix(policy): return target user policy payload
vitormattos Apr 1, 2026
cb1e2b3
chore(api): add target user policy write type
vitormattos Apr 1, 2026
7cf228c
test(policy): cover target user policy store
vitormattos Apr 1, 2026
042e787
fix(policy): consume target user policy payload
vitormattos Apr 1, 2026
f821d18
chore(openapi): regenerate administration spec
vitormattos Apr 1, 2026
f2af6fb
chore(openapi): regenerate full spec
vitormattos Apr 1, 2026
313472a
chore(openapi): regenerate administration types
vitormattos Apr 1, 2026
91e0a11
chore(openapi): regenerate full types
vitormattos Apr 1, 2026
4b67fcd
test(policy): stabilize workbench persistence e2e
vitormattos Apr 1, 2026
710a42a
test(signature-flow): stabilize request sidebar e2e
vitormattos Apr 1, 2026
2873fbc
test(reminder): stabilize reminder action e2e
vitormattos Apr 1, 2026
52c55db
test: align admin policy response assertions
vitormattos Apr 1, 2026
0bf16b1
test: isolate guest signature element scenario
vitormattos Apr 1, 2026
39dca11
fix: remove policy controller 500 mapping
vitormattos Apr 2, 2026
f7cb1f7
test: cover policy controller exception bubbling
vitormattos Apr 2, 2026
f824238
fix: align system policy error type
vitormattos Apr 2, 2026
ef7ce39
build: regenerate openapi spec
vitormattos Apr 2, 2026
b06aec6
build: regenerate administration openapi spec
vitormattos Apr 2, 2026
98c0a5b
build: regenerate full openapi spec
vitormattos Apr 2, 2026
2309847
build: regenerate openapi types
vitormattos Apr 2, 2026
20169d1
build: regenerate administration openapi types
vitormattos Apr 2, 2026
fef97b9
build: regenerate full openapi types
vitormattos Apr 2, 2026
fa6ddd5
test: cover policy workbench compact view config
vitormattos Apr 2, 2026
fe7be21
test: drop brittle admin initial state unit test
vitormattos Apr 2, 2026
0582dcf
test: expand admin initial state integration coverage
vitormattos Apr 2, 2026
9eac24f
test: drop migration unit test
vitormattos Apr 2, 2026
895f2bd
fix: run signed file writes as owner
vitormattos Apr 2, 2026
5bf5f1f
test: cover owner-scoped signed file writes
vitormattos Apr 2, 2026
2f183b9
fix: tolerate invalid identify methods config
vitormattos Apr 2, 2026
5c807f0
test: cover invalid identify methods config fallback
vitormattos Apr 2, 2026
0e4ea79
test: stabilize admin initial state coverage
vitormattos Apr 2, 2026
97464b1
fix: reuse resolved signing file owner
vitormattos Apr 2, 2026
089c874
test: align owner session signing regression
vitormattos Apr 2, 2026
16f7d13
fix: load legacy identify methods config
vitormattos Apr 3, 2026
1091b37
test: cover legacy identify methods config
vitormattos Apr 3, 2026
67c58c5
fix: reuse saved identify method defaults
vitormattos Apr 3, 2026
2f44a80
test: cover account identify method defaults
vitormattos Apr 3, 2026
e06c087
test: inject policy service in PageControllerTest
vitormattos Apr 7, 2026
6e4ab74
test(sidebar): fix loadState typing in request signature spec
vitormattos Apr 7, 2026
684b1d8
fix(policy-workbench): pass editor context props to policy editor
vitormattos Apr 9, 2026
c81ff58
fix(signature-flow): block no-op default option on instance create
vitormattos Apr 9, 2026
7d41e7f
fix(policy-workbench): require dirty draft before saving rules
vitormattos Apr 9, 2026
89b5410
fix(policy-workbench): align instance row and create gating with glob…
vitormattos Apr 9, 2026
4c930db
test(signature-flow): cover disabled default option in instance create
vitormattos Apr 9, 2026
4d996ac
test(policy-workbench): require system create value change before save
vitormattos Apr 9, 2026
6d5b140
test(policy-workbench): show remove and instance create actions in UI
vitormattos Apr 9, 2026
58ae8c5
test(e2e): reflect baseline reset behavior without explicit instance row
vitormattos Apr 9, 2026
0020ba6
fix(migration): migrate docmdp_level from string to int type
vitormattos Apr 9, 2026
d86f63b
fix(policy-workbench): isolate override counters per setting card
vitormattos Apr 9, 2026
81321e1
test(policy-workbench): prevent cross-card rule count leakage
vitormattos Apr 9, 2026
a23ea86
refactor(ui): simplify policy workbench terminology
vitormattos Apr 9, 2026
5bfe808
refactor(ui): rewrite setting copy for clarity
vitormattos Apr 9, 2026
b8ea0c7
refactor(ui): rename signature flow default label
vitormattos Apr 9, 2026
470df82
refactor(ui): align signing order definition wording
vitormattos Apr 9, 2026
987e673
refactor(ui): remove policy term from identify factors
vitormattos Apr 9, 2026
d3ad7de
refactor(ui): replace override badge label
vitormattos Apr 9, 2026
5202dac
refactor(ui): simplify legacy signing settings copy
vitormattos Apr 9, 2026
94ee297
test(ui): update signature flow label assertions
vitormattos Apr 9, 2026
038ee41
test(ui): update summary wording expectations
vitormattos Apr 9, 2026
e0dd276
test(ui): adapt settings workbench terminology checks
vitormattos Apr 9, 2026
fd937fd
refactor(migration): split Version18001 into scoped helpers
vitormattos Apr 9, 2026
fcdb203
refactor(docmdp): enforce typed config read only
vitormattos Apr 9, 2026
decb7ba
refactor(identify): remove legacy config fallback path
vitormattos Apr 9, 2026
245b8c1
feat(policy): register docmdp provider in registry
vitormattos Apr 9, 2026
ee7d75f
refactor(policy): tighten signature flow normalizer types
vitormattos Apr 9, 2026
a6378aa
refactor(policy): remove runtime typed fallback branches
vitormattos Apr 9, 2026
457ac5d
refactor(request): align signature flow handling with typed policy
vitormattos Apr 9, 2026
8d7570b
refactor(ui): remove legacy signature flow compatibility mapping
vitormattos Apr 9, 2026
097f666
test(app): align bootstrap expectations with policy updates
vitormattos Apr 9, 2026
e1cfc4f
test(sidebar): remove legacy signature flow compatibility cases
vitormattos Apr 9, 2026
b6d3dcd
test(settings): align docmdp settings assertions
vitormattos Apr 9, 2026
5703f64
refactor(ui): align docmdp settings presentation
vitormattos Apr 9, 2026
0359265
test(identify): remove legacy appconfig fallback assertions
vitormattos Apr 9, 2026
91397fe
test(policy): align service expectations with strict typed values
vitormattos Apr 9, 2026
9833592
test(policy): update signature flow provider normalization checks
vitormattos Apr 9, 2026
3f93415
test(policy): update registry normalization expectations
vitormattos Apr 9, 2026
3fd69fc
test(policy): align source behavior with strict typed reads
vitormattos Apr 9, 2026
20ad866
test(request): align request signature flow expectations
vitormattos Apr 9, 2026
0de711e
feat(policy): add docmdp policy provider
vitormattos Apr 9, 2026
70bd7de
feat(ui): add docmdp scalar rule editor
vitormattos Apr 9, 2026
0384960
test(policy): add docmdp provider unit coverage
vitormattos Apr 9, 2026
425358f
fix(openapi): add docmdp policy snapshot to api schema
vitormattos Apr 9, 2026
6605f1d
fix(openapi): mirror docmdp snapshot schema in full spec
vitormattos Apr 9, 2026
3099b00
fix(types): align openapi snapshot typing for docmdp
vitormattos Apr 9, 2026
7ffcc51
fix(types): mirror docmdp snapshot typing in full types
vitormattos Apr 9, 2026
d19e226
fix(api): define docmdp policy snapshot metadata type
vitormattos Apr 9, 2026
fe5a688
chore(openapi): regenerate api specification
vitormattos Apr 9, 2026
e757064
chore(openapi): regenerate full api specification
vitormattos Apr 9, 2026
c8f9a53
chore(types): regenerate openapi types
vitormattos Apr 9, 2026
6b3eadb
chore(types): regenerate full openapi types
vitormattos Apr 9, 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
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