-
-
Notifications
You must be signed in to change notification settings - Fork 139
feat: add observer participant role for signature requests #8143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lfals
wants to merge
53
commits into
LibreSign:main
Choose a base branch
from
lfals:feat/participant-role-observer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
7ac3643
feat(db): add participant_role to sign requests
lfals e05c7f9
feat(policy): add enable_observer_profile setting
lfals 9c8bb7c
feat(api): enforce observer participant workflow in backend
lfals f8ef798
feat(ui): add observer role selection in request signature flow
lfals bd2f828
chore(devcontainer): harden setup and add configure script
lfals 0d6164d
fix(db): drop orphan participant_profile_id column
lfals c7fbcab
fix(observer): exclude observers from signing status calculation
lfals a9f4c1a
feat(observer): route observer notifications to validation view
lfals 03d1e52
fix(ui): restore add participant button label in request tab
lfals de05049
feat(validation): separate observers and fix observer status handling
lfals e817e4d
chore(l10n): add observer participant role translations
lfals 75900ef
fix(validation): retry validation after sign redirect
lfals 450765a
chore(l10n): translate add participant button labels
lfals f039695
fix(ui): localize observer search labels in participant modal
lfals 6de204c
fix(signing): require at least one signer to request signatures
lfals 7820505
fix(observer): address pre-merge review checklist
lfals f5795b0
style: apply php-cs-fixer import ordering fixes
lfals cfa42bc
revert: chore(devcontainer): harden setup and add configure script
lfals 5288952
test(playwright): adapt request-signature flows to observer UI
lfals 9a56d6e
test(playwright): add Search signer selection helpers
lfals 49658c2
test(playwright): use Search signer helpers in request flows
lfals fbb677e
test(playwright): fix policy workbench Everyone rule editing
lfals f53670b
test(playwright): stabilize signing flows against viewport and cert sβ¦
lfals ed6d7f8
Merge branch 'main' into feat/participant-role-observer
lfals 3340915
revert(l10n): drop manual translation updates from PR
lfals b3d6a83
merge: integrate main into feat/participant-role-observer
lfals 884d2e4
test(mail): mock File uuid via entity __call
lfals c5a866f
Merge branch 'main' into feat/participant-role-observer
lfals 16fe8e1
test(playwright): target signer search input by stable id
lfals 75d72d4
chore: merge main into feat/participant-role-observer
lfals 6c8ddb1
test(unit): align sign request mocks with participantRole param
lfals 41c6882
fix(db): remove experimental participant_profile_id migration
lfals d21a668
fix(enum): reject invalid participant roles instead of falling back
lfals e086863
fix(sign-request): reject role changes after a request is signed
lfals 0b94f23
fix(frontend): treat participantRole as the role source of truth
lfals ad6f028
fix(ui): keep Add signer button when observer profile is disabled
lfals a785b14
test(mail): use real entities instead of mocking entity __call
lfals ce49e17
test(observer): cover end-to-end and API observer workflows
lfals 5f9ee6c
test(frontend): fix participant role CI regressions
lfals 60eaa2d
test(observer): align integration scenario with API ordering
lfals 4340d34
Merge branch 'LibreSign:main' into feat/participant-role-observer
lfals 64ef5ec
test(observer): scope participant assertions to sidebar sections
lfals 15fab62
fix(observer): preserve policy snapshot for requests
lfals a825a3a
fix(openapi): describe observer policy snapshot
lfals 9cf7ce0
test(playwright): replace footer template reliably
lfals 44e58cb
chore: merge main into observer participant branch
lfals 583ae7c
fix(observer): skip live policy when file snapshot is missing
lfals 278bfcb
fix(observer): store policy snapshot on envelope create
lfals ef592af
fix(observer): loosen envelope policy payload types for psalm
lfals fbb39c2
chore: bump app version to 16.0.0-dev.2
lfals 2eafe83
fix(observer): allow existing requests to adopt observers when policyβ¦
lfals 7bf4625
fix(ui): show API error when participant save fails
lfals a9d9d2e
chore: merge main into observer participant branch
lfals File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2026 LibreCode coop and contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| namespace OCA\Libresign\Enum; | ||
|
|
||
| use OCP\IL10N; | ||
|
|
||
| enum ParticipantRole: string { | ||
| case SIGNER = 'signer'; | ||
| case OBSERVER = 'observer'; | ||
|
|
||
| public function canSign(): bool { | ||
| return $this === self::SIGNER; | ||
| } | ||
|
|
||
| public function getLabel(IL10N $l10n): string { | ||
| return match ($this) { | ||
| // TRANSLATORS Participant role label for someone who must digitally sign the document. | ||
| self::SIGNER => $l10n->t('Signer'), | ||
| // TRANSLATORS Participant role label for someone who can only view the document and track progress. | ||
| self::OBSERVER => $l10n->t('Observer'), | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
| * @throws \ValueError When $value is not empty and is not a known participant role | ||
| */ | ||
| public static function fromNullable(?string $value): self { | ||
| if ($value === null || $value === '') { | ||
| return self::SIGNER; | ||
| } | ||
|
|
||
| return self::from($value); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2026 LibreCode coop and contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| namespace OCA\Libresign\Migration; | ||
|
|
||
| use Closure; | ||
| use OCP\DB\ISchemaWrapper; | ||
| use OCP\DB\Types; | ||
| use OCP\Migration\IOutput; | ||
| use OCP\Migration\SimpleMigrationStep; | ||
|
|
||
| class Version19000Date20260830200000 extends SimpleMigrationStep { | ||
| /** | ||
| * @param Closure(): ISchemaWrapper $schemaClosure | ||
| */ | ||
| #[\Override] | ||
| public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { | ||
| /** @var ISchemaWrapper $schema */ | ||
| $schema = $schemaClosure(); | ||
|
|
||
| if (!$schema->hasTable('libresign_sign_request')) { | ||
| return null; | ||
| } | ||
|
|
||
| $table = $schema->getTable('libresign_sign_request'); | ||
| if ($table->hasColumn('participant_role')) { | ||
| return null; | ||
| } | ||
|
|
||
| $table->addColumn('participant_role', Types::STRING, [ | ||
| 'notnull' => true, | ||
| 'length' => 32, | ||
| 'default' => 'signer', | ||
| ]); | ||
|
|
||
| return $schema; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.