Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class CorporateDashboardComponent implements OnInit, OnDestroy {
this.organization
);
// Do NOT block on the persisted (possibly stale) isSanctioned flag. If the company is
// currently marked sanctioned, show a non-blocking WARNING but still proceed to the
// currently marked for additional trade-compliance review, show a non-blocking WARNING but still proceed to the
// decisive step. checkEmployeeSignature() runs the live SSS check
// (/v2/check-prepare-employee-signature), which clears a stale sss-origin block on a
// clean result and blocks (errors.sanctioned, handled below) when it is genuinely
Expand All @@ -198,9 +198,9 @@ export class CorporateDashboardComponent implements OnInit, OnDestroy {
// organization.isSanctioned is typed as a string in the model; normalize so both a
// boolean false and a literal "false" are correctly treated as not-flagged.
if (String(this.organization.isSanctioned).toLowerCase() === 'true') {
this.title = 'Sanctions Screening';
this.title = 'Compliance Review Required';
this.message =
'Heads up: this organization is currently marked as flagged by sanctions screening. We\'ll re-verify in the next step, and if it is still flagged you won\'t be able to acknowledge the ECLA. If you believe this is an error, please contact EasyCLA Support via the chat widget.';
'Heads up: this organization currently requires additional trade compliance screening review. We\'ll re-verify in the next step, and if it is still flagged you won\'t be able to acknowledge the CLA. If you believe this is an error, please contact EasyCLA Support via the chat widget.';
this.openWithDismiss(this.warningModal);
this.intercomService.show();
}
Expand Down Expand Up @@ -238,12 +238,11 @@ export class CorporateDashboardComponent implements OnInit, OnDestroy {
Object.prototype.hasOwnProperty.call(response.errors, 'sanctioned')
) {
// Authoritative live SSS verdict from check-prepare/request-employee-signature:
// the company is currently sanctioned (the persisted flag may have been stale;
// this is the live result). Show the dedicated sanctioned message.
this.title = 'Sanctions Screening';
// the company requires additional trade-compliance review (the persisted flag may
// have been stale; this is the live result). Show the dedicated compliance message.
this.title = 'Compliance Review Required';
this.message =
response.errors.description ||
'We\'re sorry, but this organization is flagged by sanctions screening, so the Employee Contributor License Agreement (ECLA) cannot be completed at this time. If you believe this is an error, please contact EasyCLA Support via the chat widget.';
'We\'re sorry, but this organization requires additional trade compliance review, so the Contributor License Agreement (CLA) cannot be completed at this time. If you believe this is an error, please contact EasyCLA Support via the chat widget.';
Comment thread
lukaszgryglicki marked this conversation as resolved.
this.openWithDismiss(this.warningModal);
this.intercomService.show();
return;
Expand Down Expand Up @@ -299,24 +298,23 @@ export class CorporateDashboardComponent implements OnInit, OnDestroy {
.subscribe(
(response: any) => {
// /v2/request-employee-signature can return a legacy HTTP-200 body carrying a
// sanctioned block ({code:403, errors:{sanctioned}}) — don't treat every 200 as
// success; mirror the precheck handling so a live sanction still blocks here.
// compliance block ({code:403, errors:{sanctioned}}) — don't treat every 200 as
// success; mirror the precheck handling so a trade-compliance review flag still blocks here.
if (response && response.errors) {
if (
Object.prototype.hasOwnProperty.call(response.errors, 'sanctioned')
) {
this.title = 'Sanctions Screening';
this.title = 'Compliance Review Required';
this.message =
response.errors.description ||
'We\'re sorry, but this organization is flagged by sanctions screening, so the Employee Contributor License Agreement (ECLA) cannot be completed at this time. If you believe this is an error, please contact EasyCLA Support via the chat widget.';
'We\'re sorry, but this organization requires additional trade compliance review, so the Contributor License Agreement (CLA) cannot be completed at this time. If you believe this is an error, please contact EasyCLA Support via the chat widget.';
Comment thread
lukaszgryglicki marked this conversation as resolved.
this.openWithDismiss(this.warningModal);
this.intercomService.show();
return;
}
this.alertService.error(
response.errors.project_id ||
response.errors.server ||
'Unable to complete the ECLA request.'
'Unable to complete the CLA request.'
);
return;
}
Expand Down
Loading