Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit de12300

Browse files
author
Dominik František Bučík
authored
Merge pull request #27 from dBucik/embl_lsaai
fix: 🐛 Fix EMBL displaying of GDPR message in consent
2 parents 12f790c + 6b6cf1f commit de12300

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

lib/ConsentHelper.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public static function getJurisdiction($dstMetadata): string
4949
if (empty($jurisdiction) || array_key_exists($jurisdiction, self::EU_EAA)) {
5050
return '';
5151
}
52-
if ('INT' === $jurisdiction) {
53-
return 'provided by an international organization.';
52+
if ('INT' === $jurisdiction || 'EMBL' === $jurisdiction) {
53+
return $jurisdiction;
5454
}
5555

5656
return 'in ' . $countryCodes[$jurisdiction];
@@ -115,10 +115,18 @@ public static function printJurisdictionWarning(string $parsedJurisdiction, $spP
115115
{
116116
if (!empty($parsedJurisdiction)) {
117117
echo '<div class="alert alert-danger" role="alert">' . PHP_EOL;
118-
echo ' <h6>This service is ' . $parsedJurisdiction . '</h6>' . PHP_EOL;
119-
echo ' <p>In order to access the requested services, the Life Science Login needs to transfer your personal data to a country outside EU/EEA. We cannot guarantee that this country offers an adequately high level of personal data protection as EU/EEA countries.</p>' . PHP_EOL;
118+
if ($parsedJurisdiction === 'INT' || $parsedJurisdiction === 'EMBL') {
119+
echo ' <h6>This service is provided by an international organization.</h6>' . PHP_EOL;
120+
} else {
121+
echo ' <h6>This service is ' . $parsedJurisdiction . '</h6>' . PHP_EOL;
122+
}
123+
if ($parsedJurisdiction === 'EMBL') {
124+
echo ' <p>In order to access the requested services, the Life Science Login needs to transfer your personal data to an international organization outside EU/EEA jurisdictions.<br/><i>Please be aware that upon transfer your personal data will be protected by <a href="https://www.embl.org/documents/document/internal-policy-no-68-on-general-data-protection/" target="_blank">EMBL’s Internal Policy 68 on General Data Protection</a>.</i>' . PHP_EOL;
125+
} else {
126+
echo ' <p>In order to access the requested services, the Life Science Login needs to transfer your personal data to a country outside EU/EEA. We cannot guarantee that this country offers an adequately high level of personal data protection as EU/EEA countries.</p>' . PHP_EOL;
127+
}
120128
if (false !== $spPrivacyPolicy) {
121-
echo 'Please, read the <a target="_blank" href="' .$spPrivacyPolicy . '">Privacy Policy</a> of the service provider to learn more about its commitments to protect your data.' . PHP_EOL;
129+
echo '<h6>Please, read the <a target="_blank" href="' .$spPrivacyPolicy . '">Privacy Policy</a> of the service provider to learn more about its commitments to protect your data.' . PHP_EOL;
122130
}
123131
echo ' <div class="form-check">' . PHP_EOL;
124132
echo ' <input class="form-check-input" type="checkbox" name="transfer" id="transfer" data-np-checked="1">' . PHP_EOL;
@@ -139,9 +147,10 @@ public static function printPrivacyPolicyWarning($spPrivacyPolicy)
139147

140148
public static function printAcceptedTosWarning($dstMetadata)
141149
{
142-
if (empty($dstMetadata['accepted_tos'])) {
150+
if ((!empty($dstMetadata['test.sp']) && $dstMetadata['test.sp']) || empty($dstMetadata['accepted_tos'])) {
143151
echo '<div class="alert alert-warning" role="alert">' . PHP_EOL;
144-
echo ' <h6>This service has not declared compliance with the <a target="_blank" href="https://lifescience-ri.eu/aai/terms-of-use">Terms of Use for service providers</a> that govern the service\'s use of Life Science Login.</h6>' . PHP_EOL;
152+
echo ' <p>You are entering a service that is in the test environment of Life Science Login. The test environment is for service developers to test their relying service’s AAI integration before requesting to move them to the Life Science Login production environment.</p>' . PHP_EOL;
153+
echo ' <p>The test environment is not intended for common users. You are able to access the service because you have opted in as a test user. You need to refresh your registration every 30 days.</p>' . PHP_EOL;
145154
echo '</div>' . PHP_EOL;
146155
}
147156
}

0 commit comments

Comments
 (0)