esup_signature: switch eppn and create_by_eppn parameters (#78405)
gitea/passerelle/pipeline/head This commit looks good
Details
gitea/passerelle/pipeline/head This commit looks good
Details
This commit is contained in:
parent
415e9f8a9e
commit
d479819f50
|
@ -35,7 +35,7 @@ SIGN_REQUEST_SCHEMA = {
|
|||
'title': '',
|
||||
'description': '',
|
||||
'type': 'object',
|
||||
'required': ['file', 'recipients_emails', 'create_by_eppn'],
|
||||
'required': ['file', 'recipients_emails', 'eppn'],
|
||||
'unflatten': True,
|
||||
'properties': collections.OrderedDict(
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ SIGN_REQUEST_SCHEMA = {
|
|||
'enum': ['visa', 'pdfImageStamp', 'certSign', 'nexuSign'],
|
||||
'default': 'pdfImageStamp',
|
||||
},
|
||||
'create_by_eppn': {'type': 'string', 'description': 'EPPN of the sign request owner'},
|
||||
'eppn': {'type': 'string', 'description': 'EPPN of the sign request owner'},
|
||||
'title': {'type': 'string', 'description': 'Title'},
|
||||
'target_url': {
|
||||
'type': 'string',
|
||||
|
@ -114,7 +114,7 @@ SIGN_REQUEST_WITH_WORKFLOW_SCHEMA = {
|
|||
'title': '',
|
||||
'description': '',
|
||||
'type': 'object',
|
||||
'required': ['file', 'eppn', 'workflow_id'],
|
||||
'required': ['file', 'create_by_eppn', 'workflow_id'],
|
||||
'unflatten': True,
|
||||
'properties': collections.OrderedDict(
|
||||
{
|
||||
|
@ -151,7 +151,7 @@ SIGN_REQUEST_WITH_WORKFLOW_SCHEMA = {
|
|||
'description': 'Steps numbers were every recipient has to sign',
|
||||
'items': {'type': 'string'},
|
||||
},
|
||||
'eppn': {'type': 'string', 'description': 'EPPN of the sign request owner'},
|
||||
'create_by_eppn': {'type': 'string', 'description': 'EPPN of the sign request owner'},
|
||||
'workflow_id': {'type': 'string', 'description': 'Identifier of the workflow'},
|
||||
'title': {'type': 'string', 'description': 'Title'},
|
||||
'target_urls': {
|
||||
|
@ -255,7 +255,7 @@ class EsupSignature(BaseResource, HTTPResource):
|
|||
'force_all_sign': 'false',
|
||||
'comment': 'a comment',
|
||||
'sign_type': 'pdfImageStamp',
|
||||
'create_by_eppn': 'aa@foo.com',
|
||||
'eppn': 'aa@foo.com',
|
||||
'title': 'a title',
|
||||
'target_url': 'smb://foo.bar/location-1/',
|
||||
},
|
||||
|
@ -279,7 +279,7 @@ class EsupSignature(BaseResource, HTTPResource):
|
|||
'recipientsCCEmails': clean_list(post_data.get('recipients_cc_emails', [])),
|
||||
'comment': post_data.get('comment', ''),
|
||||
'signType': post_data.get('sign_type', 'pdfImageStamp'),
|
||||
'createByEppn': post_data['create_by_eppn'],
|
||||
'eppn': post_data['eppn'],
|
||||
'title': post_data.get('title', ''),
|
||||
'targetUrl': post_data.get('target_url', ''),
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ class EsupSignature(BaseResource, HTTPResource):
|
|||
'content': 'JVBERi0xL...(base64 PDF)...',
|
||||
},
|
||||
'workflow_id': '99',
|
||||
'eppn': 'aa@foo.com',
|
||||
'create_by_eppn': 'aa@foo.com',
|
||||
'title': 'a title',
|
||||
'recipients_emails/0': '0*xx@foo.com',
|
||||
'recipients_emails/1': '0*yy@foo.com',
|
||||
|
@ -345,7 +345,7 @@ class EsupSignature(BaseResource, HTTPResource):
|
|||
}
|
||||
|
||||
params = {
|
||||
'createByEppn': post_data['eppn'],
|
||||
'createByEppn': post_data['create_by_eppn'],
|
||||
'title': post_data.get('title', ''),
|
||||
'recipientsEmails': clean_list(post_data.get('recipients_emails', [])),
|
||||
'allSignToCompletes': clean_list(post_data.get('all_sign_to_completes', [])),
|
||||
|
|
|
@ -31,13 +31,13 @@ def test_new(app, connector):
|
|||
},
|
||||
'recipients_emails/0': 'foo@invalid',
|
||||
'recipients_emails/1': 'bar@invalid',
|
||||
'create_by_eppn': 'baz@invalid',
|
||||
'eppn': 'baz@invalid',
|
||||
'title': 'a title',
|
||||
}
|
||||
with responses.RequestsMock() as rsps:
|
||||
query_params = {
|
||||
'recipientsEmails': ['foo@invalid', 'bar@invalid'],
|
||||
'createByEppn': 'baz@invalid',
|
||||
'eppn': 'baz@invalid',
|
||||
'title': 'a title',
|
||||
'signType': 'pdfImageStamp',
|
||||
'pending': True,
|
||||
|
@ -67,7 +67,7 @@ def test_new_with_workflow(app, connector):
|
|||
'content_type': 'text/plain',
|
||||
},
|
||||
'workflow_id': '99',
|
||||
'eppn': 'aa@foo.com',
|
||||
'create_by_eppn': 'aa@foo.com',
|
||||
'title': 'a title',
|
||||
'recipients_emails/0': '0*xx@foo.com',
|
||||
'recipients_emails/1': '0*yy@foo.com',
|
||||
|
|
Loading…
Reference in New Issue