Skip to content
Draft
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
1793 commits
Select commit Hold shift + click to select a range
1ae2a7d
feat(ui): update src/views/Settings/PolicyWorkbench/settings/signatur…
vitormattos May 23, 2026
56a8a59
feat(ui): update src/views/Settings/PolicyWorkbench/useRealPolicyWork…
vitormattos May 23, 2026
5a8fd68
test(policy): update tests/integration/features/sign/request.feature
vitormattos May 23, 2026
840cb59
test(policy): update tests/php/Api/Controller/RequestSignatureControl…
vitormattos May 23, 2026
df77edf
test(policy): update tests/php/Unit/Controller/PolicyControllerTest.php
vitormattos May 23, 2026
98d60cc
test(policy): update tests/php/Unit/Handler/CertificateEngine/AEngine…
vitormattos May 23, 2026
269bbc1
test(policy): update tests/php/Unit/Helper/ValidateHelperTest.php
vitormattos May 23, 2026
3a7a0d9
test(policy): update tests/php/Unit/Service/File/MessagesLoaderTest.php
vitormattos May 23, 2026
e8b37ce
test(policy): update tests/php/Unit/Service/Policy/Model/PolicySpecTe…
vitormattos May 23, 2026
efe03f2
test(policy): update tests/php/Unit/Service/Policy/Model/ResolvedPoli…
vitormattos May 23, 2026
624a0af
test(policy): update tests/php/Unit/Service/Policy/PolicyAuthorizatio…
vitormattos May 23, 2026
007d3e7
test(policy): update tests/php/Unit/Service/Policy/Provider/ApprovalG…
vitormattos May 23, 2026
40c2088
test(policy): update tests/php/Unit/Service/Policy/Provider/IdentifyM…
vitormattos May 23, 2026
fc797b0
test(policy): update tests/php/Unit/Service/Policy/Provider/RequestSi…
vitormattos May 23, 2026
359a887
test(policy): update tests/php/Unit/Service/Policy/Runtime/DefaultPol…
vitormattos May 23, 2026
397d9d8
test(policy): update tests/php/Unit/Service/Policy/Runtime/PolicyCont…
vitormattos May 23, 2026
3fc945b
test(policy): update tests/php/Unit/Service/Policy/Runtime/PolicySour…
vitormattos May 23, 2026
874fdfc
chore(openapi): regenerate OpenAPI schema and TypeScript types
vitormattos May 23, 2026
14ed79b
fix: update lib/Controller/PolicyController.php
vitormattos May 24, 2026
5115966
fix: update lib/Service/Policy/PolicyAuthorizationService.php
vitormattos May 24, 2026
cc61a9d
fix: update lib/Service/Policy/PolicyService.php
vitormattos May 24, 2026
6d8abe7
fix: update lib/Service/Policy/Provider/RequestSignGroups/RequestSign…
vitormattos May 24, 2026
0a75484
fix: update lib/Service/Policy/Runtime/DefaultPolicyResolver.php
vitormattos May 24, 2026
e0fc1ff
fix: update lib/Service/Policy/Runtime/PolicyContextFactory.php
vitormattos May 24, 2026
56a0c63
test: update playwright/e2e/sidebar-policies-menu-visibility-multigro…
vitormattos May 24, 2026
ab18557
feat: update src/components/Settings/Settings.vue
vitormattos May 24, 2026
9ccf567
test: update src/tests/components/Settings/Settings.spec.ts
vitormattos May 24, 2026
d9d7a56
test: update src/tests/views/Settings/PolicyWorkbench/RequestSignGrou…
vitormattos May 24, 2026
ace916b
test: update src/tests/views/Settings/PolicyWorkbench/settings/reques…
vitormattos May 24, 2026
f53a3cd
test: update src/tests/views/Settings/PolicyWorkbench/useRealPolicyWo…
vitormattos May 24, 2026
11aee76
feat: update src/views/Settings/PolicyWorkbench/Catalog/components/Po…
vitormattos May 24, 2026
3da208f
feat: update src/views/Settings/PolicyWorkbench/PolicyRuleEditorPanel…
vitormattos May 24, 2026
a1f9967
feat: update src/views/Settings/PolicyWorkbench/settings/request-sign…
vitormattos May 24, 2026
61a1f97
feat: update src/views/Settings/PolicyWorkbench/settings/request-sign…
vitormattos May 24, 2026
93f7327
feat: update src/views/Settings/PolicyWorkbench/useRealPolicyWorkbenc…
vitormattos May 24, 2026
1978222
test: update tests/php/Unit/Service/AccountServiceTest.php
vitormattos May 24, 2026
9aa3ad3
test: update tests/php/Unit/Service/Policy/PolicyAuthorizationService…
vitormattos May 24, 2026
c3f74f5
test: update tests/php/Unit/Service/Policy/Provider/RequestSignGroups…
vitormattos May 24, 2026
285cfe3
test: update tests/php/Unit/Service/Policy/Runtime/DefaultPolicyResol…
vitormattos May 24, 2026
237073b
test: update tests/php/Unit/Service/Policy/Runtime/PolicyContextFacto…
vitormattos May 24, 2026
df5229a
fix: standardize sign button label to 'Sign document'
vitormattos May 25, 2026
def1ca3
test: update assertion to match standardized 'Sign document' label
vitormattos May 25, 2026
c3c2268
test(e2e): replace regex with exact 'Sign document' label selector
vitormattos May 25, 2026
c715315
chore: update lib/Controller/PolicyController.php
vitormattos May 25, 2026
34a41e9
chore: update lib/ResponseDefinitions.php
vitormattos May 25, 2026
081bd68
chore: update lib/Service/Policy/Contract/IPolicySource.php
vitormattos May 25, 2026
0b90e2a
chore: update lib/Service/Policy/PolicyService.php
vitormattos May 25, 2026
7f425d8
chore: update lib/Service/Policy/Runtime/DefaultPolicyResolver.php
vitormattos May 25, 2026
3165418
chore: update lib/Service/Policy/Runtime/PolicySource.php
vitormattos May 25, 2026
f2a819e
chore: update playwright/e2e/confetti-after-signing-policy.spec.ts
vitormattos May 25, 2026
81d0db3
chore: update playwright/e2e/envelope-validation-multi-file-bug.spec.ts
vitormattos May 25, 2026
5704106
chore: update playwright/e2e/multi-signer-sequential.spec.ts
vitormattos May 25, 2026
3eaeccc
chore: update playwright/e2e/policy-settings-menu-visibility.spec.ts
vitormattos May 25, 2026
09cb9ae
chore: update playwright/e2e/sidebar-policies-menu-visibility-multigr…
vitormattos May 25, 2026
bceecd2
chore: update playwright/e2e/sign-email-token-authenticated.spec.ts
vitormattos May 25, 2026
0af31c3
chore: update playwright/e2e/sign-email-token-unauthenticated.spec.ts
vitormattos May 25, 2026
0b6f117
chore: update playwright/e2e/sign-envelope-unauthenticated-visible-si…
vitormattos May 25, 2026
e04864e
chore: update playwright/e2e/sign-herself-updates-files-list-with-nat…
vitormattos May 25, 2026
8ee0a4e
chore: update playwright/e2e/sign-herself-with-click-to-sign.spec.ts
vitormattos May 25, 2026
011c908
chore: update playwright/e2e/sign-herself-with-drawn-signature.spec.ts
vitormattos May 25, 2026
0814e39
chore: update playwright/e2e/sign-herself-with-pkcs12-certificate.spe…
vitormattos May 25, 2026
2388642
chore: update playwright/e2e/sign-password-non-retriable-error.spec.ts
vitormattos May 25, 2026
e65b6e7
chore: update playwright/support/pdf-fixtures.ts
vitormattos May 25, 2026
6b1870e
chore: update src/store/policies.ts
vitormattos May 25, 2026
2f8cd8f
chore: update src/types/index.ts
vitormattos May 25, 2026
9998e2d
chore: update src/views/Settings/PolicyWorkbench/Catalog/Catalog.vue
vitormattos May 25, 2026
f358caf
chore: update src/views/Settings/PolicyWorkbench/Catalog/composables/…
vitormattos May 25, 2026
9d2c135
chore: update src/views/Settings/PolicyWorkbench/useRealPolicyWorkben…
vitormattos May 25, 2026
2aae808
chore: update src/tests/views/Settings/PolicyWorkbench/Catalog/Catalo…
vitormattos May 25, 2026
9876097
chore: update src/tests/views/Settings/PolicyWorkbench/Catalog/compos…
vitormattos May 25, 2026
1809d3f
chore: update tests/php/Unit/Controller/PolicyControllerTest.php
vitormattos May 25, 2026
c48a3ce
chore: update tests/php/Unit/Service/Policy/PolicyServiceTest.php
vitormattos May 25, 2026
6eb405a
chore: update tests/php/Unit/Service/Policy/Runtime/DefaultPolicyReso…
vitormattos May 25, 2026
c468e22
chore: update tests/php/Unit/Service/Policy/Runtime/PolicySourceTest.php
vitormattos May 25, 2026
ce613d9
chore: update openapi artifacts
vitormattos May 25, 2026
b78e367
fix: stabilize unauthenticated email token signing e2e
vitormattos May 25, 2026
1f0ace3
fix: stabilize visible signature envelope e2e
vitormattos May 25, 2026
5284191
chore: commit remaining changes
vitormattos May 25, 2026
b13e764
fix(playwright): preserve full invitation sign link path
vitormattos May 25, 2026
ba14ab0
fix(playwright): use email invitation link in envelope signing flow
vitormattos May 25, 2026
4f00edc
fix(playwright): normalize invitation sign-link extraction
vitormattos May 25, 2026
72f457f
test: improve provisioning cleanup helpers
vitormattos May 26, 2026
dc6eec0
test: stabilize policy settings menu visibility teardown
vitormattos May 26, 2026
f00dbe5
test: move boolean preferences cleanup to hooks
vitormattos May 26, 2026
118dd7b
test: refactor system default persistence cleanup
vitormattos May 26, 2026
c180370
test: refactor identify methods rule cleanup
vitormattos May 26, 2026
f7f1d71
test: refactor multigroup sidebar lifecycle hooks
vitormattos May 26, 2026
002088f
test: move boolean workbench cleanup to afterEach
vitormattos May 26, 2026
4a3017d
test: move signature flow api context cleanup to hook
vitormattos May 26, 2026
7c8720a
test: adjust unauthenticated email token flow
vitormattos May 26, 2026
6197c3f
test: adjust unauthenticated envelope visible signature flow
vitormattos May 26, 2026
60981ac
fix: allow unauthenticated access to public sign route
vitormattos May 26, 2026
7211e1b
feat: add private validation attribute options
vitormattos May 26, 2026
7320dd4
refactor: configure private validation per page route
vitormattos May 26, 2026
1e182d1
fix: enforce private validation by attribute policy
vitormattos May 26, 2026
2691406
test: cover private validation bypass and redirect paths
vitormattos May 26, 2026
8e84e55
test: stabilize unauthenticated email token signing flow
vitormattos May 26, 2026
dc6f898
test: stabilize visible signature envelope signing flow
vitormattos May 26, 2026
6f24396
fix: cs
vitormattos May 26, 2026
545288e
fix: wait for validation route in email token e2e
vitormattos May 26, 2026
c7bf44b
fix: wait longer for visible signature cta
vitormattos May 26, 2026
1c08001
fix: scope delete confirmation ok button in e2e
vitormattos May 26, 2026
5ec5b0d
test: stabilize envelope and sequential signing e2e flows
vitormattos May 26, 2026
e19a13e
test: harden envelope invitation route detection
vitormattos May 26, 2026
b054b73
test: harden sequential invitation route detection
vitormattos May 26, 2026
405c76a
fix: allow signers with a valid UUID to access validation when page i…
vitormattos May 27, 2026
e39026d
fix: allow signers with a valid UUID to fetch PDF when validation is …
vitormattos May 27, 2026
c43e66e
fix: check file UUID as fallback in private validation middleware
vitormattos May 27, 2026
92374ab
test: reset make_validation_url_private before workbench UI test
vitormattos May 27, 2026
1474087
refactor: centralize page policy state payload
vitormattos May 28, 2026
484c650
refactor: centralize policy controller state payload
vitormattos May 28, 2026
38df252
refactor: centralize template loader policy state
vitormattos May 28, 2026
da92eb4
fix: document everyoneCount in policy responses
vitormattos May 28, 2026
edcc010
fix: add system policy clear contract
vitormattos May 28, 2026
05ce7e7
refactor: centralize policy state serialization
vitormattos May 28, 2026
1c4264d
fix: normalize identify methods defaults
vitormattos May 28, 2026
89c068d
fix: clear default system policy values
vitormattos May 28, 2026
cc45dff
fix: expose rule counts in admin initial state
vitormattos May 28, 2026
415dfac
fix: clear system policy through default value
vitormattos May 28, 2026
5fa1f05
test: cover system policy clear request
vitormattos May 28, 2026
2f67b4b
test: update request sign groups real definition spec
vitormattos May 28, 2026
5cdb680
test: cover system policy reset flow
vitormattos May 28, 2026
bca39c4
fix: surface custom rule counters in catalog
vitormattos May 28, 2026
f087869
fix: align request sign groups policy definition
vitormattos May 28, 2026
0cefd6b
fix: reset system policies through defaults
vitormattos May 28, 2026
9acdb41
test: cover clearing identify methods badge data
vitormattos May 28, 2026
e829374
test: enable libresign in behat bootstrap
vitormattos May 28, 2026
150f41c
test: cover centralized page policy state mapping
vitormattos May 28, 2026
5099e18
test: cover centralized policy controller mapping
vitormattos May 28, 2026
d8753dd
test: cover centralized template loader mapping
vitormattos May 28, 2026
89b185e
test: cover policy state serialization
vitormattos May 28, 2026
3d3c540
test: cover identify methods default normalization
vitormattos May 28, 2026
b85a647
test: add clear system support to default resolver
vitormattos May 28, 2026
813c4f8
test: cover clearing default system policies
vitormattos May 28, 2026
749fbe9
test: cover admin policy state bootstrap
vitormattos May 28, 2026
b447c53
chore: regenerate openapi artifacts
vitormattos May 28, 2026
c196d25
fix: add everyone count to catalog summaries
vitormattos May 28, 2026
98af082
fix: drop stale workbench rule count helper
vitormattos May 28, 2026
9e9d406
test: add everyone count to preferences policy mocks
vitormattos May 28, 2026
7b95ee3
test: align policy workbench spec with current UI
vitormattos May 28, 2026
10affdd
fix: stabilize frontend watch
vitormattos May 28, 2026
5d66bc8
fix: use backend defaults for signature stamp model
vitormattos May 28, 2026
49b22a3
fix: emit signature text preview readiness
vitormattos May 28, 2026
ad2a32d
fix: stabilize signature text preview loading
vitormattos May 28, 2026
ffe9d61
test: cover backend defaults in signature text model spec
vitormattos May 28, 2026
9fc03b1
test: align signature text real definition spec defaults
vitormattos May 28, 2026
9b12fc9
test: align signature text policy composable spec
vitormattos May 28, 2026
65c5338
test: align real policy workbench signature stamp spec
vitormattos May 28, 2026
7a32805
test: cover signature text preview readiness
vitormattos May 28, 2026
b2eaa45
fix: extract vite watch argv helper
vitormattos May 28, 2026
d54ac0c
fix: gate vite build watch mode
vitormattos May 28, 2026
9401cfc
test: cover vite watch argv gating
vitormattos May 28, 2026
3bb6d0a
fix: share footer default template path
vitormattos May 29, 2026
125cb1b
refactor: add resolved policy meta contract
vitormattos May 29, 2026
1cf894e
refactor: support resolved policy meta in policy specs
vitormattos May 29, 2026
8af2244
refactor: include policy meta in resolved payloads
vitormattos May 29, 2026
066eb30
refactor: stop flattening default policy metadata
vitormattos May 29, 2026
8113222
fix: preserve footer default templates in policy values
vitormattos May 29, 2026
ffbcbd9
fix: publish footer canonical defaults in policy meta
vitormattos May 29, 2026
58fd5cd
fix: publish signature stamp canonical defaults
vitormattos May 29, 2026
1a1d8bc
refactor: propagate resolved policy metadata
vitormattos May 29, 2026
450ba81
fix: require subadmin capability for group policies
vitormattos May 29, 2026
00daf70
fix: count explicit system rules in policy source
vitormattos May 29, 2026
0ab43e3
refactor: expose policy meta in effective responses
vitormattos May 29, 2026
29f92e4
chore: regenerate openapi policy contracts
vitormattos May 29, 2026
0a078ac
refactor: align effective policy types with generated meta
vitormattos May 29, 2026
0ba211b
refactor: pass policy state to fallback resolvers
vitormattos May 29, 2026
f5d03a8
fix: reset footer customization to inherited state
vitormattos May 29, 2026
c814e2e
fix: read footer defaults from policy meta
vitormattos May 29, 2026
04ddd88
fix: derive signature stamp defaults from policy meta
vitormattos May 29, 2026
1b081f7
fix: use signature stamp meta for fallback defaults
vitormattos May 29, 2026
b3b149c
refactor: pass policy state into workbench fallbacks
vitormattos May 29, 2026
71851ec
test: update signature text rule editor coverage
vitormattos May 29, 2026
2b93a75
test: update signature text real definition coverage
vitormattos May 29, 2026
c9e33c5
test: update footer real definition coverage
vitormattos May 29, 2026
dd2872c
test: update footer rule editor reset coverage
vitormattos May 29, 2026
faa6c3b
test: update workbench fallback coverage
vitormattos May 29, 2026
6847ac5
test: update signature text policy hook coverage
vitormattos May 29, 2026
a4bea80
test: assert policy meta in admin initial state
vitormattos May 29, 2026
5ff7696
test: preserve policy meta in controller responses
vitormattos May 29, 2026
0855b74
test: cover policy spec resolved metadata
vitormattos May 29, 2026
262b848
test: cover resolved policy meta payloads
vitormattos May 29, 2026
1afb45e
test: cover policy service meta serialization
vitormattos May 29, 2026
36a8452
test: cover footer policy metadata
vitormattos May 29, 2026
f35ca89
test: cover footer policy value defaults
vitormattos May 29, 2026
080a2bc
test: cover signature text policy metadata
vitormattos May 29, 2026
7ff2608
test: cover resolver policy meta propagation
vitormattos May 29, 2026
4178b5f
test: cover subadmin policy capabilities
vitormattos May 29, 2026
b923499
test: cover footer policy registry metadata
vitormattos May 29, 2026
211325d
test: cover explicit system rule counts
vitormattos May 29, 2026
0cd6305
test: drop legacy footer default initial state
vitormattos May 29, 2026
b7800a3
test: remove footer real definition import ignore
vitormattos May 29, 2026
d1cb1a7
refactor: remove obsolete footer template initial state
vitormattos May 29, 2026
fec126c
fix: cs
vitormattos May 29, 2026
7749e2e
refactor: drop dedicated system policy clear helper
vitormattos May 29, 2026
f00daf7
test: remove system clear helper coverage
vitormattos May 29, 2026
8e18793
fix: reset system rules through generic policy flow
vitormattos May 29, 2026
47b31d9
test: cover stale footer hydration after delete
vitormattos May 29, 2026
eb44033
refactor: extract personal preference visibility helper
vitormattos May 29, 2026
efb355b
fix: align preferences menu visibility
vitormattos May 29, 2026
50ca343
fix: reuse shared preference visibility helper
vitormattos May 29, 2026
42869d1
test: cover preferences menu visibility rules
vitormattos May 29, 2026
a9f9015
test: align workbench regression expectations
vitormattos May 29, 2026
85c6080
test: stabilize identify methods workbench e2e
vitormattos May 29, 2026
ea65eeb
fix: protect delegated request access rules
vitormattos May 29, 2026
4e7476f
fix: hide delegated access seed rules
vitormattos May 29, 2026
fdf474b
fix: hide request access seed rules in workbench
vitormattos May 29, 2026
d0756cc
test: cover delegated access service restrictions
vitormattos May 29, 2026
d763155
test: cover hidden delegated access rules
vitormattos May 29, 2026
9166ba8
test: cover hidden request access workbench rules
vitormattos May 29, 2026
8bf5b40
fix: hide delegated access counts
vitormattos May 29, 2026
da5c3b1
test: cover hidden delegated access counts
vitormattos May 29, 2026
aee41a3
fix: align hidden access summary counts
vitormattos May 29, 2026
985ca37
test: cover hidden access summary counts
vitormattos May 29, 2026
86b6992
refactor: expose scoped group policy source lookup
vitormattos May 29, 2026
501785d
refactor: scope group policy source lookup
vitormattos May 29, 2026
6dc466d
fix: count visible delegated access rules by target
vitormattos May 29, 2026
a67cdc7
fix: scope delegated access count filtering
vitormattos May 29, 2026
3f03b28
test: cover scoped group policy source lookup
vitormattos May 29, 2026
0732b1a
test: cover visible delegated access counts in service
vitormattos May 29, 2026
1b83c26
test: cover scoped source lookup doubles
vitormattos May 29, 2026
52d874e
test: cover scoped delegated access counts in controller
vitormattos May 29, 2026
e16f45c
fix: scope group policy listings by target
vitormattos May 29, 2026
b5cb5b5
fix: avoid global group policy scans for subadmins
vitormattos May 29, 2026
74412aa
test: cover scoped group policy listings
vitormattos May 29, 2026
f7cffa9
fix: add missing override to policy source
vitormattos May 29, 2026
e6b2a3b
fix: normalize visible policy rule counts
vitormattos May 29, 2026
7f9ceb7
fix: skip unreadable proc fd targets
vitormattos May 29, 2026
bf973b0
test: cover unreadable proc fd targets
vitormattos May 29, 2026
aaeca8d
fix: wait longer for CFSSL startup
vitormattos May 29, 2026
fea6a15
test: stabilize identify methods e2e
vitormattos May 29, 2026
dcedcb4
refactor: isolate policy governance definitions
vitormattos May 30, 2026
7f5b746
refactor: delegate policy workbench behavior
vitormattos May 30, 2026
0b1048b
test: finalize policy feature migration
vitormattos May 30, 2026
74935f2
test: clarify resolver dataset comment
vitormattos May 30, 2026
4850e1c
fix: cs
vitormattos May 30, 2026
7b1318b
fix: cs
vitormattos May 30, 2026
724c48f
chore: update openapi documentation
vitormattos May 30, 2026
5472769
test: restore playwright policy state
vitormattos May 30, 2026
a1228f0
fix: align user policy openapi types
vitormattos May 30, 2026
a1c601e
fix: tolerate transient cfssl startup connection failures
vitormattos May 30, 2026
fc619eb
feat: add composed request-sign access policy
vitormattos May 30, 2026
eec91de
fix: align policy tests with composed request-sign payload
vitormattos May 30, 2026
7a5629e
fix(ux): hide Authorized section for group admin managing own group
vitormattos May 30, 2026
dd4c1bb
fix(ux): derive scope targets from allow groups for groups_request_sign
vitormattos May 30, 2026
8de7755
fix(ux): keep authorized editor visible during scope derivation
vitormattos May 30, 2026
f7d503d
fix(ux): seed request-sign group create from explicit allow rules
vitormattos May 30, 2026
e877e0a
fix: seed baseline value without targetIds to prevent field-hiding re…
vitormattos May 30, 2026
98c9e86
fix: use shared l10n mock in confetti rule editor test
vitormattos May 30, 2026
1441d12
fix: repair policy workbench types
vitormattos May 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"nextcloud/ocp": "dev-master",
"psr/http-client": "^1.0",
"roave/security-advisories": "dev-latest"
},
"config": {
Expand Down
97 changes: 54 additions & 43 deletions composer.lock

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'
import nextcloudConfig from '@nextcloud/eslint-config'
import globals from 'globals'
import { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'

const compat = new FlatCompat({
baseDirectory: dirname(fileURLToPath(import.meta.url)),
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

const compatConfigs = (Array.isArray(nextcloudConfig) ? nextcloudConfig : [nextcloudConfig])
.flatMap((config) => compat.config(config))

export default [
...(Array.isArray(nextcloudConfig) ? nextcloudConfig : [nextcloudConfig]),
...compatConfigs,

{
name: 'libresign/ignores',
Expand Down
Binary file added img/preview_signature.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
8 changes: 4 additions & 4 deletions lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

namespace OCA\Libresign;

use OCA\Libresign\AppInfo\Application;
use OCA\Libresign\Service\Envelope\EnvelopeService;
use OCA\Libresign\Service\Policy\PolicyService;
use OCA\Libresign\Service\Policy\Provider\Confetti\ConfettiPolicy;
use OCA\Libresign\Service\SignatureTextService;
use OCA\Libresign\Service\SignerElementsService;
use OCP\App\IAppManager;
use OCP\Capabilities\IPublicCapability;
use OCP\IAppConfig;

/**
* @psalm-import-type LibresignCapabilities from ResponseDefinitions
Expand All @@ -29,7 +29,7 @@ public function __construct(
protected SignatureTextService $signatureTextService,
protected IAppManager $appManager,
protected EnvelopeService $envelopeService,
protected IAppConfig $appConfig,
protected PolicyService $policyService,
) {
}

Expand All @@ -43,7 +43,7 @@ public function getCapabilities(): array {
$capabilities = [
'features' => self::FEATURES,
'config' => [
'show-confetti' => $this->appConfig->getValueBool(Application::APP_ID, 'show_confetti_after_signing', true),
'show-confetti' => $this->policyService->resolve(ConfettiPolicy::KEY)->getEffectiveValueAsBool(true),
'sign-elements' => [
'is-available' => $this->signerElementsService->isSignElementsAvailable(),
'can-create-signature' => $this->signerElementsService->canCreateSignature(),
Expand Down
4 changes: 2 additions & 2 deletions lib/Collaboration/Collaborators/AccountPhonePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use OC\KnownUser\KnownUserService;
use OCA\Libresign\Service\Identify\SearchNormalizer;
use OCA\Libresign\Service\Identify\SignerSearchContext;
use OCA\Libresign\Service\IdentifyMethodService;
use OCP\Accounts\IAccountManager;
use OCP\Collaboration\Collaborators\ISearchPlugin;
use OCP\Collaboration\Collaborators\ISearchResult;
Expand All @@ -22,7 +23,6 @@

class AccountPhonePlugin implements ISearchPlugin {
public const TYPE_SIGNER_ACCOUNT_PHONE = 51;
private const PHONE_BASED_METHODS = ['whatsapp', 'sms', 'telegram', 'signal'];

public function __construct(
private IAppConfig $appConfig,
Expand All @@ -44,7 +44,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
$method = $this->searchContext->getMethod();
$search = trim((string)$search);

if ($search === '' || !in_array($method, self::PHONE_BASED_METHODS, true)) {
if ($search === '' || !in_array($method, IdentifyMethodService::IDENTIFY_PHONE_METHODS, true)) {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Collaboration/Collaborators/ContactPhonePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use OC\KnownUser\KnownUserService;
use OCA\Libresign\Service\Identify\SearchNormalizer;
use OCA\Libresign\Service\Identify\SignerSearchContext;
use OCA\Libresign\Service\IdentifyMethodService;
use OCP\Collaboration\Collaborators\ISearchPlugin;
use OCP\Collaboration\Collaborators\ISearchResult;
use OCP\Collaboration\Collaborators\SearchResultType;
Expand All @@ -22,7 +23,6 @@

class ContactPhonePlugin implements ISearchPlugin {
public const TYPE_SIGNER_CONTACT_PHONE = 52;
private const PHONE_BASED_METHODS = ['whatsapp', 'sms', 'telegram', 'signal'];

public function __construct(
private IAppConfig $appConfig,
Expand All @@ -44,7 +44,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
$method = $this->searchContext->getMethod();
$search = trim((string)$search);

if ($search === '' || !in_array($method, self::PHONE_BASED_METHODS, true)) {
if ($search === '' || !in_array($method, IdentifyMethodService::IDENTIFY_PHONE_METHODS, true)) {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Collaboration/Collaborators/ManualPhonePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace OCA\Libresign\Collaboration\Collaborators;

use OCA\Libresign\Service\Identify\SignerSearchContext;
use OCA\Libresign\Service\IdentifyMethodService;
use OCP\Collaboration\Collaborators\ISearchPlugin;
use OCP\Collaboration\Collaborators\ISearchResult;
use OCP\Collaboration\Collaborators\SearchResultType;
Expand All @@ -17,7 +18,6 @@

class ManualPhonePlugin implements ISearchPlugin {
public const TYPE_SIGNER_MANUAL_PHONE = 53;
private const PHONE_BASED_METHODS = ['whatsapp', 'sms', 'telegram', 'signal'];

public function __construct(
private IConfig $config,
Expand All @@ -34,7 +34,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
$method = $this->searchContext->getMethod();
$search = trim((string)$search);

if ($search === '' || !in_array($method, self::PHONE_BASED_METHODS, true)) {
if ($search === '' || !in_array($method, IdentifyMethodService::IDENTIFY_PHONE_METHODS, true)) {
return false;
}

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) {
}
}
}
Loading
Loading