Skip to content

Commit

Permalink
Enforce signer visibility (#155)
Browse files Browse the repository at this point in the history
* add enforce_signer_visibility & fix search for esign
  • Loading branch information
RomanBachaloSigmaSoftware authored Mar 27, 2024
1 parent 12f1b84 commit 505bee7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 15 deletions.
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ GEM
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi (1.15.5-x64-mingw-ucrt)
globalid (1.1.0)
activesupport (>= 5.0)
hashie (5.0.0)
Expand Down Expand Up @@ -177,8 +178,12 @@ GEM
net-smtp (0.3.3)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.4-x64-mingw-ucrt)
racc (~> 1.4)
nokogiri (1.15.4-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
Expand Down Expand Up @@ -295,7 +300,9 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.6.4-x64-mingw-ucrt)
sqlite3 (1.6.4-x86_64-darwin)
sqlite3 (1.6.4-x86_64-linux)
test-unit (3.6.1)
power_assert
thor (1.2.2)
Expand Down Expand Up @@ -328,7 +335,9 @@ GEM
zeitwerk (2.6.11)

PLATFORMS
x64-mingw-ucrt
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
bootsnap (~> 1.7.3)
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const DS_SEARCH = (function () {
case API_TYPES.MONITOR:
return "meg";
case API_TYPES.ESIGNATURE:
return "eg";
return "eeg";
case API_TYPES.CONNECT:
return "cneg";
case API_TYPES.WEBFORMS:
Expand Down
4 changes: 2 additions & 2 deletions app/services/admin_api/eg005_audit_users_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def worker
#ds-snippet-start:Admin5Step5
results = []
modified_users.each do |user|
#ds-snippet-end:Admin5Step5
#ds-snippet-start:Admin5Step4
#ds-snippet-end:Admin5Step5
#ds-snippet-start:Admin5Step4
userProfilesOptions = DocuSign_Admin::GetUserProfilesOptions.new
userProfilesOptions.email = user['email']
#ds-snippet-end:Admin5Step4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def make_envelope(envelope_args)
envelope_definition = DocuSign_eSign::EnvelopeDefinition.new

envelope_definition.email_subject = 'Please sign this document set'
envelope_definition.enforce_signer_visibility = 'true'

# Add the documents
doc1_b64 = Base64.encode64(create_document1(envelope_args))
Expand Down
24 changes: 12 additions & 12 deletions app/services/webforms/eg001_create_instance_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def create_web_form_instance(form_id)
'JobTitle' => 'Programmer Writer'
}
web_form_req_object = DocuSign_WebForms::CreateInstanceRequestBody.new({
'clientUserId' => args[:client_user_id],
'formValues' => web_form_values,
'expirationOffset' => '3600'
})
'clientUserId' => args[:client_user_id],
'formValues' => web_form_values,
'expirationOffset' => '3600'
})
#ds-snippet-end:WebForms1Step4

#ds-snippet-start:WebForms1Step5
Expand All @@ -79,18 +79,18 @@ def make_web_forms_template

# Create the document model
document = DocuSign_eSign::Document.new({
# Create the DocuSign document object
'documentBase64' => base64_file_content,
'name' => 'World_Wide_Web_Form', # Can be different from actual file name
'fileExtension' => 'pdf', # Many different document types are accepted
'documentId' => '1' # A label used to reference the doc
})
# Create the DocuSign document object
'documentBase64' => base64_file_content,
'name' => 'World_Wide_Web_Form', # Can be different from actual file name
'fileExtension' => 'pdf', # Many different document types are accepted
'documentId' => '1' # A label used to reference the doc
})

# Create the signer recipient model
# Since these are role definitions, no name/email:
signer = DocuSign_eSign::Signer.new({
'roleName' => 'signer', 'recipientId' => '1', 'routingOrder' => '1'
})
'roleName' => 'signer', 'recipientId' => '1', 'routingOrder' => '1'
})
# Create fields using absolute positioning
# Create a sign_here tab (field on the document)
sign_here = DocuSign_eSign::SignHere.new(
Expand Down

0 comments on commit 505bee7

Please sign in to comment.