Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
876 commits
Select commit Hold shift + click to select a range
4c11a9a
test: cover assigned user policy store payloads
vitormattos Apr 12, 2026
d883f94
test: cover assigned user policy workbench flows
vitormattos Apr 12, 2026
1ed260d
feat: add assigned user policy frontend type
vitormattos Apr 12, 2026
88d8b44
chore: refresh administration openapi frontend types
vitormattos Apr 12, 2026
c023d0c
chore: refresh full openapi frontend types
vitormattos Apr 12, 2026
d3296d1
feat: label assigned user policy in preferences
vitormattos Apr 12, 2026
7d19aee
feat: show user customization toggle in rule editor
vitormattos Apr 12, 2026
0bd101f
feat: keep signature flow override toggle visible
vitormattos Apr 12, 2026
725321f
feat: allow signature flow child override settings
vitormattos Apr 12, 2026
9b99a76
feat: default mock policy overrides to enabled
vitormattos Apr 12, 2026
76a9f6e
feat: map assigned user policies in workbench
vitormattos Apr 12, 2026
6e7a683
test: cover assigned user policy api flow
vitormattos Apr 12, 2026
8f328ff
test: update policy controller assigned user cases
vitormattos Apr 12, 2026
a9ce30a
test: update policy service assigned user cases
vitormattos Apr 12, 2026
6f2f801
test: cover assigned user policy resolution
vitormattos Apr 12, 2026
e074d09
test: fix policy context factory dependency
vitormattos Apr 12, 2026
0317b3a
test: cover assigned user policy persistence
vitormattos Apr 12, 2026
b43b345
fix: add cRLSign usage to openssl root CA
vitormattos Apr 12, 2026
20bb353
test: enforce explicit CRL signature verification
vitormattos Apr 12, 2026
f3f6ef0
fix: make CRL verify assertion portable across OpenSSL variants
vitormattos Apr 12, 2026
4008ab9
fix: stabilize authenticated email-token sign flow
vitormattos Apr 12, 2026
df5b479
fix: support remove action label variants in policy e2e
vitormattos Apr 12, 2026
b990421
fix: harden authenticated email-token e2e flow
vitormattos Apr 12, 2026
bebc954
fix: reduce unauthenticated email-token e2e flakiness
vitormattos Apr 12, 2026
6217e39
fix: stabilize native sign e2e with footer policy guard
vitormattos Apr 12, 2026
f8b1a29
test: tighten authenticated email-token flow assertions
vitormattos Apr 12, 2026
c74ea0a
test: ensure footer cleanup covers authenticated setup
vitormattos Apr 12, 2026
863cacb
test: ensure footer cleanup covers unauthenticated setup
vitormattos Apr 12, 2026
269ebce
test: ensure footer cleanup covers native sign setup
vitormattos Apr 12, 2026
18af729
refactor: move authenticated e2e cleanup to hooks
vitormattos Apr 12, 2026
6d8ead3
refactor: move unauthenticated e2e cleanup to hooks
vitormattos Apr 12, 2026
58920ae
refactor: move native-sign e2e cleanup to hooks
vitormattos Apr 12, 2026
c3ccfee
refactor(e2e): extract footer policy guard to shared support module
vitormattos Apr 12, 2026
5e6092f
refactor(e2e): use shared useFooterPolicyGuard in authenticated spec
vitormattos Apr 12, 2026
5532845
refactor(e2e): use shared useFooterPolicyGuard in unauthenticated spec
vitormattos Apr 12, 2026
ab30837
refactor(e2e): use shared useFooterPolicyGuard in native-sign spec
vitormattos Apr 12, 2026
1533c6b
fix(ui): show Policies menu for editable delegated capabilities
vitormattos Apr 12, 2026
6b6bb6c
fix(policy-workbench): list editable policies before first group rule
vitormattos Apr 12, 2026
6468bf8
test(ui): cover policies visibility for editable delegated policy
vitormattos Apr 12, 2026
a633687
test(policy-workbench): allow editable policies without group rules
vitormattos Apr 12, 2026
de26ea2
test(e2e): cover group-admin policy access before first group rule
vitormattos Apr 12, 2026
d0f1260
test(e2e): validate member preferences under group override policy
vitormattos Apr 12, 2026
3fd9bad
fix(policy-workbench): fallback group targets for subadmin rule editor
vitormattos Apr 13, 2026
0162388
fix(ui): show Preferences when any policy allows user defaults
vitormattos Apr 13, 2026
7588686
feat(preferences): add signature footer user preference controls
vitormattos Apr 13, 2026
73fa7ec
test(ui): cover generic preference visibility across policies
vitormattos Apr 13, 2026
832e454
test(preferences): cover signature footer preference section
vitormattos Apr 13, 2026
f63c90f
test(e2e): validate footer preference controls under policy hierarchy
vitormattos Apr 13, 2026
f918502
test(e2e): verify group-admin can target footer rules via workbench
vitormattos Apr 13, 2026
ead4fd1
feat(policy): update AdminController.php
vitormattos Apr 13, 2026
f34841f
feat(policy): update PageController.php
vitormattos Apr 13, 2026
5f0e588
feat(policy): update FooterHandler.php
vitormattos Apr 13, 2026
783d5a9
feat(policy): update ResolvedPolicy.php
vitormattos Apr 13, 2026
d22efc2
feat(policy): update FooterPolicy.php
vitormattos Apr 13, 2026
c37de4f
feat(policy): update FooterPolicyValue.php
vitormattos Apr 13, 2026
b18bd9b
feat(policy): update DefaultPolicyResolver.php
vitormattos Apr 13, 2026
08e1d92
test(policy): update policy-preferences-visibility.spec.ts
vitormattos Apr 13, 2026
0e88e7c
feat(ui): update CodeEditor.vue
vitormattos Apr 13, 2026
6577291
test(policy): update Preferences.spec.ts
vitormattos Apr 13, 2026
f082918
test(policy): update signatureFooterModel.spec.ts
vitormattos Apr 13, 2026
354e629
test(policy): update signatureFooterRuleEditor.spec.ts
vitormattos Apr 13, 2026
4adb164
test(policy): update useRealPolicyWorkbench.spec.ts
vitormattos Apr 13, 2026
8334ac7
test(policy): update SettingsPolicyWorkbench.spec.ts
vitormattos Apr 13, 2026
a9ab5d1
feat(policy): update Preferences.vue
vitormattos Apr 13, 2026
b65e193
feat(policy): update PolicyRuleEditorPanel.vue
vitormattos Apr 13, 2026
c242661
feat(policy): update RealPolicyWorkbench.vue
vitormattos Apr 13, 2026
f631681
feat(policy): update realTypes.ts
vitormattos Apr 13, 2026
6e45133
feat(policy): update SignatureFooterRuleEditor.vue
vitormattos Apr 13, 2026
bdb7225
feat(policy): update model.ts
vitormattos Apr 13, 2026
ed0fe83
feat(policy): update realDefinition.ts
vitormattos Apr 13, 2026
c402c1f
feat(policy): update useRealPolicyWorkbench.ts
vitormattos Apr 13, 2026
fb305a5
test(policy): update PageControllerTest.php
vitormattos Apr 13, 2026
40b338b
test(policy): update PolicyServiceTest.php
vitormattos Apr 13, 2026
5528d90
test(policy): update FooterPolicyTest.php
vitormattos Apr 13, 2026
2e1e704
feat(api): accept footer policy override in request-signature controller
vitormattos Apr 13, 2026
c69f1e1
feat(policy): resolve add_footer request overrides on signature requests
vitormattos Apr 13, 2026
1140a25
feat(footer): support request-level policy overrides during rendering
vitormattos Apr 13, 2026
b10252e
feat(sign): apply add_footer policy snapshot when stamping footer
vitormattos Apr 13, 2026
07a23c3
chore(types): include add_footer in policy snapshot response docs
vitormattos Apr 13, 2026
a109d2e
feat(store): send footer policy override in request-signature payload
vitormattos Apr 13, 2026
46a9174
feat(ui): add request-time footer template selection and preference
vitormattos Apr 13, 2026
46b52b7
test(store): cover footer policy override payload rules
vitormattos Apr 13, 2026
d9d4a53
test(ui): cover footer template selector and preference behavior
vitormattos Apr 13, 2026
cbf2650
test(policy): cover add_footer request override resolution in service
vitormattos Apr 13, 2026
c1dc39f
ux: replace footer template select with radio controls and improve mi…
vitormattos Apr 13, 2026
4bf5f06
test: add FilePolicyApplierTest covering all six policy apply/sync me…
vitormattos Apr 13, 2026
241298f
refactor: extract policy apply/sync logic into FilePolicyApplier service
vitormattos Apr 13, 2026
ea0b19f
refactor: delegate all policy application to FilePolicyApplier in Req…
vitormattos Apr 13, 2026
790e8d2
test: migrate policy tests to FilePolicyApplierTest; swap PolicyServi…
vitormattos Apr 13, 2026
b1e5dee
feat: accept structured policy payload in request signature controller
vitormattos Apr 13, 2026
92e0e52
feat: validate active policy context for request overrides
vitormattos Apr 13, 2026
21cc47f
test: cover policy payload mapping in request signature controller
vitormattos Apr 13, 2026
06dfe4b
test: validate active context authorization rules
vitormattos Apr 13, 2026
e113531
refactor: send policy overrides envelope from files store
vitormattos Apr 13, 2026
0bff93b
refactor: consume canonical signature flow values in signer
vitormattos Apr 13, 2026
74a1764
refactor: remove numeric signature flow normalization in signers list
vitormattos Apr 13, 2026
cd6497d
test: align signer signature flow expectations with canonical values
vitormattos Apr 13, 2026
f5fa0b7
test: align signers list behavior with canonical signature flow
vitormattos Apr 13, 2026
417072f
test: update files store policy override payload assertions
vitormattos Apr 13, 2026
997757f
test: update request tab signature flow scenarios
vitormattos Apr 13, 2026
fe70b33
test: normalize indentation in unauthenticated email token e2e
vitormattos Apr 13, 2026
cfbf384
test: normalize indentation in native engine files list e2e
vitormattos Apr 13, 2026
4596a21
chore: regenerate openapi contract for policy payload
vitormattos Apr 13, 2026
4eadbb1
chore: regenerate full openapi contract for policy payload
vitormattos Apr 13, 2026
74c65a8
chore: regenerate openapi types for policy payload
vitormattos Apr 13, 2026
6d6be61
chore: regenerate full openapi types for policy payload
vitormattos Apr 13, 2026
cb5e33f
refactor: remove legacy policy workbench composable spec
vitormattos Apr 13, 2026
0ec1c75
refactor: remove legacy settings policy workbench view
vitormattos Apr 13, 2026
d62ff8f
refactor: remove legacy confetti rule editor
vitormattos Apr 13, 2026
5695f65
refactor: remove legacy confetti rule module entry
vitormattos Apr 13, 2026
dd86657
refactor: remove legacy identify factors rule editor
vitormattos Apr 13, 2026
e0b6f5b
refactor: remove legacy identify factors module entry
vitormattos Apr 13, 2026
83e3aa4
refactor: remove legacy signature flow rule editor
vitormattos Apr 13, 2026
b7fd6d6
refactor: remove legacy signature flow module entry
vitormattos Apr 13, 2026
ec9b7c8
refactor: remove legacy signature stamp rule editor
vitormattos Apr 13, 2026
7c7675c
refactor: remove legacy signature stamp module entry
vitormattos Apr 13, 2026
b597bf7
refactor: remove legacy policy workbench shared types
vitormattos Apr 13, 2026
5962b3a
refactor: remove legacy policy workbench composable
vitormattos Apr 13, 2026
d39bdda
refactor(policy): delegate appliers from provider folders
vitormattos Apr 13, 2026
9a0e37c
refactor(policy): add signature flow file policy applier
vitormattos Apr 13, 2026
c862d81
refactor(policy): add docmdp file policy applier
vitormattos Apr 13, 2026
cb24ac4
refactor(policy): add footer file policy applier
vitormattos Apr 13, 2026
f9a147b
test(policy): use data providers in file policy applier test
vitormattos Apr 13, 2026
347e8e6
test(policy): add signature flow file policy applier test
vitormattos Apr 13, 2026
9f0feda
test(policy): add docmdp file policy applier test
vitormattos Apr 13, 2026
2f8cf43
test(policy): add footer file policy applier test
vitormattos Apr 13, 2026
39a16f2
test(openssl): mock certificate policy service in unit test
vitormattos Apr 13, 2026
b36b74d
test(e2e): move policy preferences cleanup to hooks
vitormattos Apr 13, 2026
90674ae
test(e2e): move policy settings cleanup to hooks
vitormattos Apr 13, 2026
7704b22
test(e2e): move workbench personas cleanup to hooks
vitormattos Apr 13, 2026
06d5cdc
test(e2e): stabilize signature flow sidebar lifecycle
vitormattos Apr 13, 2026
3b95a83
test(e2e): refactor sequential multi-signer fixture setup
vitormattos Apr 13, 2026
8061981
fix(tests): sort imports alphabetically in DocMdpFilePolicyApplierTest
vitormattos Apr 13, 2026
9072931
fix(tests): update FooterPolicyValueTest to include new fields in exp…
vitormattos Apr 13, 2026
ef302d8
fix(tests): add missing inheritedValue in ResolvedPolicyTest toArray …
vitormattos Apr 13, 2026
ddda640
fix(tests): add missing inheritedValue in PolicyControllerTest toArra…
vitormattos Apr 13, 2026
1f6643f
fix(tests): add missing inheritedValue in TemplateLoaderTest toArray …
vitormattos Apr 13, 2026
2f0df98
fix(e2e): replace non-existent 'Save footer preference' button check …
vitormattos Apr 13, 2026
5a9e0b9
fix(e2e): allow 401 in clearOwnPreference when group admin user is no…
vitormattos Apr 13, 2026
3ce3186
fix(e2e): stabilize preferences visibility scenario with explicit set…
vitormattos Apr 13, 2026
b0599b4
refactor(policy): add file policy applier contract
vitormattos Apr 13, 2026
3cd2e16
refactor(policy): adapt signature flow applier to shared contract
vitormattos Apr 13, 2026
6c960c2
refactor(policy): adapt docmdp applier to shared contract
vitormattos Apr 13, 2026
6c12f77
refactor(policy): adapt footer applier to shared contract
vitormattos Apr 13, 2026
cbac8ef
refactor(policy): auto-discover file appliers from provider registry
vitormattos Apr 13, 2026
badca68
refactor(policy): remove unused private wrappers from file applier
vitormattos Apr 13, 2026
7b202cd
test(policy): replace private-reflection checks with public orchestra…
vitormattos Apr 13, 2026
e1c6b52
feat(e2e): add policy-api support module with generic OCS helpers
vitormattos Apr 13, 2026
15c1e85
refactor(e2e): use policy-api support helpers in preferences visibili…
vitormattos Apr 13, 2026
165b0c8
refactor(e2e): use policy-api support helpers in workbench personas spec
vitormattos Apr 13, 2026
16d7616
refactor(e2e): use policy-api support helpers in sidebar spec
vitormattos Apr 13, 2026
9d08a0d
chore: fix SPDX copyright year in FilePolicyApplier
vitormattos Apr 13, 2026
90981e2
chore: fix SPDX copyright year in DocMdpFilePolicyApplier
vitormattos Apr 13, 2026
743138b
chore: fix SPDX copyright year in FooterFilePolicyApplier
vitormattos Apr 13, 2026
6bfa34f
chore: fix SPDX copyright year in SignatureFlowFilePolicyApplier
vitormattos Apr 13, 2026
5639a0c
feat(e2e): add nc-navigation support module with expandSettingsMenu h…
vitormattos Apr 13, 2026
28a7656
refactor(e2e): use nc-navigation expandSettingsMenu in preferences vi…
vitormattos Apr 13, 2026
e06938c
refactor(e2e): use policy-api and nc-navigation helpers in settings m…
vitormattos Apr 13, 2026
139fc99
refactor(e2e): use system-policies and policy-api helpers in multi-si…
vitormattos Apr 13, 2026
e24061b
refactor(policy-footer): extract footer template source option resolu…
vitormattos Apr 14, 2026
7ccdcf5
refactor(request-sidebar): consume footer source options from provide…
vitormattos Apr 14, 2026
2505afd
test(policy-footer): cover footer template source option resolution
vitormattos Apr 14, 2026
bcb70d7
style(e2e): normalize indentation in multi-signer sequential spec
vitormattos Apr 14, 2026
bf8edc3
feat(policy-flow): add shared signature flow model helpers
vitormattos Apr 14, 2026
2c2b301
refactor(policy-flow): reuse shared model in real definition
vitormattos Apr 14, 2026
dad6943
refactor(request-sidebar): use signature flow support model helpers
vitormattos Apr 14, 2026
10c5eeb
test(policy-flow): add model coverage for signature flow resolution
vitormattos Apr 14, 2026
b349ed0
feat(policy-flow): extract request payload resolver to model
vitormattos Apr 14, 2026
4daebc5
feat(policy-footer): extract request payload resolver to model
vitormattos Apr 14, 2026
5427d23
refactor(request-sidebar): consume policy payload resolvers from models
vitormattos Apr 14, 2026
6720f73
test(policy-flow): cover request payload resolver
vitormattos Apr 14, 2026
3c735d6
test(policy-footer): cover request payload resolver
vitormattos Apr 14, 2026
36851e8
refactor(types): derive system and user policy states from OpenAPI
vitormattos Apr 14, 2026
5edc16d
fix(playwright): send form content type for provisioning app config r…
vitormattos Apr 14, 2026
e1a7003
refactor(request-sign-groups): remove unnecessary context field from …
vitormattos Apr 14, 2026
99363b0
feat(policy-workbench): probe group access for group-admin scope dete…
vitormattos Apr 14, 2026
10ffb39
feat(policy-workbench): restrict scope options based on group-admin a…
vitormattos Apr 14, 2026
ddf6abc
test(policy-workbench): cover probeGroupAccess branch for group-admin
vitormattos Apr 14, 2026
c3d9ccb
feat(footer-handler): add writeQrcodeOnFooter override for preview re…
vitormattos Apr 14, 2026
027c60d
feat(footer-service): pass writeQrcodeOnFooter to handler in renderPr…
vitormattos Apr 14, 2026
d84ade9
feat(admin-controller): accept writeQrcodeOnFooter in footer preview …
vitormattos Apr 14, 2026
1fc39f5
fix(signature-footer-editor): send writeQrcodeOnFooter flag in previe…
vitormattos Apr 14, 2026
08d1248
test(footer-service): cover writeQrcodeOnFooter override scenarios in…
vitormattos Apr 14, 2026
cb329b6
test(e2e): validate writeQrcodeOnFooter flag in footer preview API vi…
vitormattos Apr 14, 2026
feb8254
fix: add request-sign-groups policy model
vitormattos Apr 14, 2026
145ac05
fix: add request-sign-groups rule editor
vitormattos Apr 14, 2026
4f61203
fix: add request-sign-groups real definition
vitormattos Apr 14, 2026
d21f85b
fix: document footer preview QR code parameter
vitormattos Apr 14, 2026
22f75da
chore: regenerate openapi schema
vitormattos Apr 14, 2026
8a22518
chore: regenerate full openapi schema
vitormattos Apr 14, 2026
4a4a172
chore: regenerate openapi types
vitormattos Apr 14, 2026
5bc9f2c
chore: regenerate full openapi types
vitormattos Apr 14, 2026
ce795d1
fix: remove unsupported eval CSP call in page controller
vitormattos Apr 14, 2026
6c2bad9
fix: remove unsupported eval CSP call in injection middleware
vitormattos Apr 14, 2026
3875bc7
feat: add IPolicyAuthorizationService interface for group policy auth…
vitormattos Apr 14, 2026
5502391
feat: implement PolicyAuthorizationService for group policy auth
vitormattos Apr 14, 2026
4a617da
test: cover group policy authorization service
vitormattos Apr 14, 2026
7c39f0b
refactor: delegate group policy auth to IPolicyAuthorizationService
vitormattos Apr 14, 2026
f0bcd05
test: update AccountServiceTest to mock IPolicyAuthorizationService
vitormattos Apr 14, 2026
b4b8817
refactor: remove noisy scoped-admin hint from request-sign-groups editor
vitormattos Apr 14, 2026
d509edb
test: validate manageable group scope filtering for single and multip…
vitormattos Apr 14, 2026
a1d381c
refactor: move shared file policy applier contract to provider suppor…
vitormattos Apr 14, 2026
3b17af8
refactor: remove misplaced provider file policy contract
vitormattos Apr 14, 2026
c8856cd
refactor: update FilePolicyApplier to use support contract namespace
vitormattos Apr 14, 2026
2aed18a
refactor: update DocMdp file applier contract import
vitormattos Apr 14, 2026
04381bf
refactor: update footer file applier contract import
vitormattos Apr 14, 2026
168a57b
refactor: update signature flow file applier contract import
vitormattos Apr 14, 2026
6adeb4f
refactor: place file policy applier contract in policy contracts name…
vitormattos Apr 14, 2026
eb59c44
refactor: remove provider support contract after relocation
vitormattos Apr 14, 2026
39eb8b1
refactor: point FilePolicyApplier to policy contract namespace
vitormattos Apr 14, 2026
0daafc9
refactor: point DocMdp file applier to policy contract namespace
vitormattos Apr 14, 2026
1c0c74d
refactor: point Footer file applier to policy contract namespace
vitormattos Apr 14, 2026
7c22b34
refactor: point Signature file applier to policy contract namespace
vitormattos Apr 14, 2026
f5b2cde
refactor: update PolicyController.php
vitormattos Apr 14, 2026
30c9f0d
refactor: update ValidateHelper.php
vitormattos Apr 14, 2026
5c7df03
refactor: update Version18001Date20260320000000.php
vitormattos Apr 14, 2026
f4a1c63
refactor: update PolicyProviders.php
vitormattos Apr 14, 2026
e0d618b
refactor: update PolicySource.php
vitormattos Apr 14, 2026
ff7c7af
refactor: update RequestSignGroupsPolicy.php
vitormattos Apr 14, 2026
28d4976
refactor: update RequestSignGroupsPolicyGuard.php
vitormattos Apr 14, 2026
6e48ad4
refactor: update RequestSignGroupsPolicyValue.php
vitormattos Apr 14, 2026
7705c9f
refactor: update RequestSignAuthorizationService.php
vitormattos Apr 14, 2026
e14e0a9
refactor: update RequestSignatureTab.vue
vitormattos Apr 14, 2026
3ce2b81
refactor: update RightSidebar.vue
vitormattos Apr 14, 2026
514979b
refactor: update RealPolicyWorkbench.vue
vitormattos Apr 14, 2026
a3612ae
refactor: update realTypes.ts
vitormattos Apr 14, 2026
7c38942
refactor: update realDefinition.ts
vitormattos Apr 14, 2026
b8c107a
refactor: update useRealPolicyWorkbench.ts
vitormattos Apr 14, 2026
4a6361b
refactor: update Settings.vue
vitormattos Apr 14, 2026
747556e
test: update PolicyControllerTest.php
vitormattos Apr 14, 2026
2098e3f
test: update ValidateHelperTest.php
vitormattos Apr 14, 2026
e1cf2f8
test: update Version18001Date20260320000000Test.php
vitormattos Apr 14, 2026
0573e81
test: update PolicyRegistryTest.php
vitormattos Apr 14, 2026
2c72671
test: update PolicySourceTest.php
vitormattos Apr 14, 2026
65a4724
test: update RequestSignGroupsPolicyTest.php
vitormattos Apr 14, 2026
d1dea5c
test: update RequestSignGroupsPolicyGuardTest.php
vitormattos Apr 14, 2026
11f9b5a
test: update RequestSignAuthorizationServiceTest.php
vitormattos Apr 14, 2026
0076819
test: update RightSidebar.spec.ts
vitormattos Apr 14, 2026
38a8099
test: update useRealPolicyWorkbench.spec.ts
vitormattos Apr 14, 2026
fd95a58
fix: register alias for policy authorization interface
vitormattos Apr 14, 2026
2323c81
test: throw app config type conflict for non-string overwrite
vitormattos Apr 14, 2026
47e8b25
chore: regenerate openapi schema
vitormattos Apr 14, 2026
e68e6fb
chore: regenerate administration openapi schema
vitormattos Apr 14, 2026
82c99f8
chore: regenerate full openapi schema
vitormattos Apr 14, 2026
20ef8de
chore: regenerate openapi frontend types
vitormattos Apr 14, 2026
c9e29c5
chore: regenerate administration openapi frontend types
vitormattos Apr 14, 2026
bf3384f
chore: regenerate full openapi frontend types
vitormattos Apr 14, 2026
1566784
refactor: remove policy authorization interface alias registration
vitormattos Apr 14, 2026
cacdd3f
refactor: inject concrete policy authorization service in account ser…
vitormattos Apr 14, 2026
e17152a
test: use concrete policy authorization service in account service test
vitormattos Apr 14, 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
1 change: 0 additions & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public function register(IRegistrationContext $context): void {
$context->registerNotifierService(Notifier::class);

$context->registerSearchProvider(FileSearchProvider::class);

$context->registerEventListener(LoadSidebar::class, TemplateLoader::class);
$context->registerEventListener(BeforeNodeDeletedEvent::class, BeforeNodeDeletedListener::class);
$context->registerEventListener(CacheEntryRemovedEvent::class, BeforeNodeDeletedListener::class);
Expand Down
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) {
}
}
}
63 changes: 9 additions & 54 deletions lib/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
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;
use OCA\Libresign\Settings\Admin;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\ApiRoute;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\DataDownloadResponse;
Expand Down Expand Up @@ -83,6 +85,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 @@ -875,7 +878,7 @@ public function getFooterTemplate(): DataResponse {
public function saveFooterTemplate(string $template = '', int $width = 595, int $height = 50) {
try {
$this->footerService->saveTemplate($template);
$pdf = $this->footerService->renderPreviewPdf('', $width, $height);
$pdf = $this->footerService->renderPreviewPdf($template, $width, $height);

return new DataDownloadResponse($pdf, 'footer-preview.pdf', 'application/pdf');
} catch (\Exception $e) {
Expand All @@ -894,15 +897,18 @@ public function saveFooterTemplate(string $template = '', int $width = 595, int
* @param string $template Template to preview
* @param int $width Width of preview in points (default: 595 - A4 width)
* @param int $height Height of preview in points (default: 50)
* @param ?bool $writeQrcodeOnFooter Whether to force QR code rendering in footer preview (null uses policy)
* @return DataDownloadResponse<Http::STATUS_OK, 'application/pdf', array{}>|DataResponse<Http::STATUS_BAD_REQUEST, LibresignErrorResponse, array{}>
*
* 200: OK
* 400: Bad request
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/admin/footer-template/preview-pdf', requirements: ['apiVersion' => '(v1)'])]
public function footerTemplatePreviewPdf(string $template = '', int $width = 595, int $height = 50) {
public function footerTemplatePreviewPdf(string $template = '', int $width = 595, int $height = 50, ?bool $writeQrcodeOnFooter = null) {
try {
$pdf = $this->footerService->renderPreviewPdf($template ?: null, $width, $height);
$pdf = $this->footerService->renderPreviewPdf($template ?: null, $width, $height, $writeQrcodeOnFooter);
return new DataDownloadResponse($pdf, 'footer-preview.pdf', 'application/pdf');
} catch (\Exception $e) {
return new DataResponse([
Expand Down Expand Up @@ -960,57 +966,6 @@ private function saveOrDeleteConfig(string $key, ?string $value, string $default
}
}

/**
* Set signature flow configuration
*
* @param bool $enabled Whether to force a signature flow for all documents
* @param string|null $mode Signature flow mode: 'parallel' or 'ordered_numeric' (only used when enabled is true)
* @return DataResponse<Http::STATUS_OK, LibresignMessageResponse, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, LibresignErrorResponse, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, LibresignErrorResponse, array{}>
*
* 200: Configuration saved successfully
* 400: Invalid signature flow mode provided
* 500: Internal server error
*/
#[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) {
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
);

return new DataResponse([
'message' => $this->l10n->t('Settings saved'),
]);
} catch (\Exception $e) {
return new DataResponse([
'error' => $e->getMessage(),
], Http::STATUS_INTERNAL_SERVER_ERROR);
}
}

/**
* Configure DocMDP signature restrictions
*
Expand Down
8 changes: 4 additions & 4 deletions lib/Controller/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function validateBinary(): DataResponse {
->toArray();
$statusCode = Http::STATUS_OK;
} catch (InvalidArgumentException $e) {
$message = $this->l10n->t($e->getMessage());
$message = $e->getMessage();
$return = [
'action' => JSActions::ACTION_DO_NOTHING,
'errors' => [['message' => $message]]
Expand Down Expand Up @@ -254,15 +254,15 @@ private function validate(
->toArray();
$statusCode = Http::STATUS_OK;
} catch (LibresignException $e) {
$message = $this->l10n->t($e->getMessage());
$message = $e->getMessage();
$return = [
'action' => JSActions::ACTION_DO_NOTHING,
'errors' => [['message' => $message]]
];
$statusCode = Http::STATUS_NOT_FOUND;
} catch (\Throwable $th) {
$message = $this->l10n->t($th->getMessage());
$this->logger->error($message);
$this->logger->error($th->getMessage(), ['exception' => $th]);
$message = $this->l10n->t('Internal error. Contact admin.');
$return = [
'action' => JSActions::ACTION_DO_NOTHING,
'errors' => [['message' => $message]]
Expand Down
15 changes: 12 additions & 3 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use OCA\Libresign\Db\FileMapper;
use OCA\Libresign\Db\SignRequestMapper;
use OCA\Libresign\Exception\LibresignException;
use OCA\Libresign\Handler\FooterHandler;
use OCA\Libresign\Helper\JSActions;
use OCA\Libresign\Helper\ValidateHelper;
use OCA\Libresign\Middleware\Attribute\PrivateValidation;
Expand All @@ -23,6 +24,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 +60,8 @@ public function __construct(
private AccountService $accountService,
protected SignFileService $signFileService,
protected RequestSignatureService $requestSignatureService,
private PolicyService $policyService,
private FooterHandler $footerHandler,
private SignerElementsService $signerElementsService,
protected IL10N $l10n,
private IdentifyMethodService $identifyMethodService,
Expand Down Expand Up @@ -106,7 +110,14 @@ 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('footer_template', $this->footerHandler->getTemplate());
$this->initialState->provideInitialState('docmdp_config', $this->docMdpConfigService->getConfig());
$this->initialState->provideInitialState('legal_information', $this->appConfig->getValueString(Application::APP_ID, 'legal_information'));

Expand All @@ -120,7 +131,6 @@ public function index(): TemplateResponse {
$response = new TemplateResponse(Application::APP_ID, 'main');

$policy = new ContentSecurityPolicy();
$policy->allowEvalScript(true);
$policy->addAllowedFrameDomain('\'self\'');
$policy->addAllowedWorkerSrcDomain("'self'");
$response->setContentSecurityPolicy($policy);
Expand Down Expand Up @@ -387,7 +397,6 @@ public function sign(string $uuid): TemplateResponse {
$response = new TemplateResponse(Application::APP_ID, 'external', [], TemplateResponse::RENDER_AS_BASE);

$policy = new ContentSecurityPolicy();
$policy->allowEvalScript(true);
$policy->addAllowedWorkerSrcDomain("'self'");
$response->setContentSecurityPolicy($policy);

Expand Down
Loading
Loading