mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°5758 Change setup test for GDPR consent (#336)
We were using SetupUtils::IsProductVersion, but this was blocking for certain packages like TeemIP standalone. After this change we are now relying on a new method : \SetupUtils::IsConnectableToITopHub. It will check the iTop Hub Connector module presence instead.
This commit is contained in:
@@ -1594,6 +1594,18 @@ JS
|
||||
return array_key_exists('itsm-designer-connector', $aModules);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $aModules List of available module codes
|
||||
*
|
||||
* @return bool true if the Hub connector is installed
|
||||
*
|
||||
* @since 2.7.8 3.0.3 3.1.0 N°5758 method creation
|
||||
*/
|
||||
public static function IsConnectableToITopHub($aModules)
|
||||
{
|
||||
return array_key_exists('itop-hub-connector', $aModules);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $aModules Available modules with code as key and metadata array as values
|
||||
* Same structure as the one returned by {@link \RunTimeEnvironment::AnalyzeInstallation}
|
||||
|
||||
@@ -707,15 +707,17 @@ class WizStepLicense extends WizardStep
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @return bool true if we need to display a GDPR confirmation
|
||||
* @throws \Exception
|
||||
* @since 2.7.7 3.0.2 3.1.0
|
||||
* @since 2.7.7 3.0.2 3.1.0 N°5037 method creation
|
||||
* @since 2.7.8 3.0.3 3.1.0 N°5758 rename from NeedsRgpdConsent to NeedsGdprConsent
|
||||
*/
|
||||
private function NeedsRgpdConsent()
|
||||
private function NeedsGdprConsent()
|
||||
{
|
||||
$sMode = $this->oWizard->GetParameter('install_mode');
|
||||
$aModules = SetupUtils::AnalyzeInstallation($this->oWizard);
|
||||
return $sMode == 'install' && !SetupUtils::IsProductVersion($aModules);
|
||||
|
||||
return (($sMode === 'install') && SetupUtils::IsConnectableToITopHub($aModules));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -752,7 +754,7 @@ EOF
|
||||
$oPage->add('</fieldset>');
|
||||
$sChecked = ($this->oWizard->GetParameter('accept_license', 'no') == 'yes') ? ' checked ' : '';
|
||||
$oPage->p('<input type="checkbox" class="check_select" name="accept_license" id="accept" value="yes" '.$sChecked.'><label for="accept"> I accept the terms of the licenses of the '.count($aLicenses).' components mentioned above.</label>');
|
||||
if ($this->NeedsRgpdConsent()) {
|
||||
if ($this->NeedsGdprConsent()) {
|
||||
$oPage->add('<div id="rgpd_message" class="message message-info">'.ITOP_APPLICATION.' software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR).<p></p>
|
||||
By installing '.ITOP_APPLICATION.' you agree that some information will be collected by Combodo to help you manage your instances and for statistical purposes.
|
||||
This data remains anonymous until it is associated to a user account on iTop Hub.</p>
|
||||
|
||||
Reference in New Issue
Block a user