feat: add observer participant role for signature requests - #8143
Conversation
Introduce signer/observer participant roles at the database layer so request-signature flows can distinguish signing participants from view-only observers. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Allow administrators to enable observer participants through the policy workbench before requesters can assign view-only roles. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Persist participant roles, block observers from signing, and keep sequential signing logic scoped to actual signers only. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Replace the single add-signer action with an add dropdown, separate signers from observers in the participant list, and hide multi-signer controls when only one signer is present. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Run occ as www-data when setup runs as root and add a reusable script to reconfigure LibreSign after environment restarts. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Remove the experimental column that was not mapped by SignRequest and broke participant creation in local development databases. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Observers must not affect partial or fully signed file status, envelope progress, or pending signer checks used for signing order. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Send observer emails and in-app links to the validation page instead of the signing flow, and redirect legacy sign URLs to validation. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Show the plus icon and Add label on the participant dropdown action. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Group signers and observers in validation UI, recognize OBSERVING status, and ignore observers when checking partial or full signature completion. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Register observer UI strings in en_GB and translate the role as testemunha in pt_BR and pt_PT while keeping Observer in English. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Force-refresh validation data when opening the page right after signing so the first load does not fail before the signed document is ready. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Register Add and Add participant strings used by the request signature tab so the dropdown button is localized in English and Portuguese. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Switch SignerSelect copy and NcSelect input label based on participant role so adding a witness shows observer-specific search text. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Block observer-only signature requests in the UI and API, showing an error toast instead of treating the operation as successful. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Preserve observers when reordering signers, exclude them from DocMDP signer limits, map OBSERVING status in summaries, regenerate OpenAPI types, and add focused regression tests for policy and signing rules. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Keep lint-php-cs CI green after observer workflow changes. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
This reverts commit bd2f828. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
130da68 to
cfa42bc
Compare
Add a shared helper for the renamed Add participant control and update E2E specs that previously clicked the removed Add signer button. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Centralize account/email signer picking on the combobox used by the add-participant dialog so specs stop relying on removed placeholders. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Update request-signature E2E specs to select account and email signers through the shared combobox helpers. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
When an Everyone rule already exists, edit it instead of waiting for a missing Everyone scope option, and make save paths dirty the form first. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
…tate Reset stale certificates/signatures when needed, keep signature stamp in a graphic-capable mode, and click Sign document with a viewport-safe helper. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Official migrations must not drop an unknown column created only in local or experimental environments. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Persisted roles are always valid after migration, so invalid values must fail rather than silently become signer. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Changing signer to observer after signing would rewrite participant meaning in audit history. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Stop inferring observer status from OBSERVING when the explicit role is already stored by the backend. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
The Add menu is only needed when enable_observer_profile is enabled, preserving the previous UI and reducing unrelated E2E churn. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Keeps observer notification coverage focused on data instead of Entity magic-method plumbing. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Add focused Playwright and Behat scenarios for enabling observers, separating roles, validation links, and blocked signing. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
|
If possible, could you also add a few screenshots to the PR description showing the observer flow? It would be useful to show:
Also, sorry for reviewing this PR while it is still a draft. I added the comments now only to help keep the work close to the expected flow and avoid bigger changes later. For the next review, it is better to add me as a reviewer and request the review when the PR is ready and is no longer a draft. After pushing new changes, when the PR is ready for review again, use the GitHub option to request my review again. This makes it clear when a new review is needed. |
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
No problem, I left it as a draft after the changes you requested. I was fixing the tests that broke. I'm going to add the observer flow and let you know when it's ready for review. |
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Existing requests without enable_observer_profile in policy_snapshot must stay disabled even if the live policy is later turned on. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Sign requests are linked to the envelope, so the observer policy must be frozen there as well as on child files. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
vitormattos
left a comment
There was a problem hiding this comment.
Only a small change:
At file appinfo/info.xml, change from:
16.0.0-dev.1
to:
16.0.0-dev.2
This will make all environments of all developers to run the migration because will identify that the version was changed.
Trigger migrations in all development environments after the version change. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
|
Could you also check this?
|
|
I found another case during manual testing. I created a signature request with one signer while the Observer policy was disabled. Then I enabled the Observer policy in Administration Settings and opened the same request again. The UI correctly showed
This happens because the frontend uses the current policy, while the backend keeps the old I think the expected behavior should be:
The saved policy state may need to move from There is also a frontend error handling problem in this case. The API returned HTTP 422 with the message
Please add regression tests for both parts:
|
Resolves: #6957
📝 Summary
Adds an observer participant role (UI label: Observer / Testemunha) to signature requests. Observers can be invited to follow document progress and open the validation view, but cannot sign. The feature is gated by the new policy
enable_observer_profile(default: disabled).Backend is the source of truth: role validation, signing denial, status/progress calculations, DocMDP signer limits, sequential signing, e-mail/notification routing, and API contracts all treat observers separately from signers. The request UI exposes separate Signers and Observers lists when the policy is enabled.
Also includes pre-merge hardening: preserve observers when reordering signers in ordered flow, require at least one signer before requesting signatures, regenerate OpenAPI/TypeScript types, and focused regression tests.
🧪 How to test
🎨 UI / Front‑end changes
file.signers🚧 Tasks
l10n/edits included for dev)⚙️ API / Back‑end changes
participant_rolecolumn on sign requests (signer|observer) with idempotent migrationenable_observer_profile(defaultfalse, system/group/user scopes)OBSERVING(status3) in signer summaries; defensiveParticipantRole::fromNullable()composer openapiif necessary🚧 Tasks
participant_profile_idcolumn (migration included)✅ Checklist
composer openapi,npm run typescript:generate)composer cs:check)🤖 AI (if applicable)