feat: add allow document rejection setting - #3362
catalinpit wants to merge 4 commits into
Conversation
Adds an allowDocumentRejection column to organisation settings (default true), team settings (nullable, inherits from the organisation) and document meta (default true), with the migration. Adds the "Allow Document Rejection" field to the organisation and team document preferences form, wires it through the settings pages, and lists it in the reset-to-defaults dialog and the admin settings section. Adds a per-document Yes/No field to the envelope editor settings dialog. Exposes the field on the document meta create/update schemas and the document, envelope, template and editor envelope response schemas, and hides the reject dialog on the V1 signing page when the document disallows rejection.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Accepts allowDocumentRejection in the organisation and team settings update routes, adds it to the default organisation (true) and team (inherit) settings, and copies the merged value into the document meta when a document or template is created via extractDerivedDocumentMeta. Documents created from a template take the template's value, with an optional override on envelope.use. Exposes the field in the recipient signing response and refuses rejectDocumentWithToken requests for documents that disallow rejection, since the endpoint can be called directly without the UI. Extends the document preferences and envelope settings e2e tests to cover inheritance into the team settings and new documents, and persistence of the per-document value from the editor.
Hides the reject dialog on the V2 signing page sidebar and mobile menu, the embed V1 signing page and the multi-sign embed view when the document's allowDocumentRejection is false. In embeds the reject option is shown only when both the embed's allowDocumentRejection option and the document setting allow it, and the embed V1 footer layout follows the same condition. Exposes the field in the multi-sign document response so the embed view can read it. Documents the relationship between the embed's allowDocumentRejection option and the document setting in the iframe and embedded editor docs, and in the API description of the field. Part of #2561
incomplete
Continues the work from #2641 which only targeted client changes. This PR expands on it:
rejectDocumentWithToken.The schema and the logic for determining the setting stay the same as in this PR.