Problem/Motivation

We'd like to use the webform signature element with the private file system.

Proposed resolution

Patch the signature element so that there is an option to store private:// or public://

User interface changes

Extra option on the element widget.

API changes

N/A internal to the widget.

Data model changes

N/A

Issue fork webform-3241469

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sime created an issue. See original summary.

sime’s picture

Initial patch to follow.

tannguyenhn’s picture

jrockowitz’s picture

I will try to find time to review the patch.

Ideally, we should backport this patch to 8.x-5.x.

The failing test is very easy to fix.

tannguyenhn’s picture

Thanks Jrockowitz
I have updated the patch to fix the failing test.

tannguyenhn’s picture

Status: Active » Needs review
pandaski’s picture

We are testing it in GovCMS distribution

jrockowitz’s picture

StatusFileSize
new18.83 KB

First off, the solution and approach are very good.

The attached patch has few tweaks

Created WebformElementFileDownloadAccessInterface
Improve readabilty of WebformSignature::accessFileDownload
Adds very basic test coverage

A few remaining questions/issues.

PDF generation with private signatures is not working. I think we can fix this.
@see \webform_entity_print_webform_submission_access

jrockowitz’s picture

StatusFileSize
new23.14 KB

This patch add PDF support to the private signature element.

jrockowitz’s picture

I think the last step is to add test coverage for including a "private" signature in PDFs via WebformEntityPrintFunctionalTest.php and webform.webform.test_entity_print.yml

If someone has time to manually review the patch, it would be greatly appreciated.

tannguyenhn’s picture

StatusFileSize
new24.59 KB

Added test coverage for including a "private" signature in PDFs via WebformEntityPrintFunctionalTest.php and webform.webform.test_entity_print.yml

Status: Needs review » Needs work

The last submitted patch, 11: 3241469-11.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

tannguyenhn’s picture

StatusFileSize
new25.5 KB
tannguyenhn’s picture

StatusFileSize
new25.46 KB

Added test coverage for including a "private" signature in PDFs via WebformEntityPrintFunctionalTest.php and webform.webform.test_entity_print.yml

tannguyenhn’s picture

StatusFileSize
new25.46 KB

Change patch name to match with comment number.

tannguyenhn’s picture

Status: Needs work » Needs review
tannguyenhn’s picture

StatusFileSize
new24.87 KB

Update the patch

tannguyenhn’s picture

StatusFileSize
new25.18 KB

This patch works with version 6.0.5.

tannguyenhn’s picture

StatusFileSize
new25.19 KB

This patch works with version 6.x-dev.

Status: Needs review » Needs work

The last submitted patch, 19: 3241469-19.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

tannguyenhn’s picture

tannguyenhn’s picture

StatusFileSize
new113.92 KB
tannguyenhn’s picture

StatusFileSize
new113.92 KB

Default uri schema is private.

tannguyenhn’s picture

StatusFileSize
new113.85 KB

Another patch for 6.0.5 webform version.

tannguyenhn’s picture

StatusFileSize
new113.23 KB
tannguyenhn’s picture

StatusFileSize
new112.79 KB
tannguyenhn’s picture

StatusFileSize
new112.79 KB
tannguyenhn’s picture

StatusFileSize
new111.25 KB

This patch is for 6.0.5 version

tannguyenhn’s picture

Status: Needs work » Needs review
jrockowitz’s picture

I am hoping to do a manual review this week.

jrockowitz’s picture

Version: 6.x-dev » 6.1.x-dev
jrockowitz’s picture

I am moving the patch to branch and PR (i.e. GitLab).

We must continue to support the public file system for signature elements to support backward compatibility.

Steps to manually review

jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz committed 1d7eb74 on 6.1.x
    Issue #3241469 by tannguyenhn, jrockowitz: Control the file system used...

  • jrockowitz committed 1d7eb74 on 6.x
    Issue #3241469 by tannguyenhn, jrockowitz: Control the file system used...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.