Debug v20

This commit is contained in:
Laurent Destailleur
2024-05-15 17:55:16 +02:00
parent bd5c50d213
commit c32ece68f4
3 changed files with 6 additions and 10 deletions

View File

@@ -39,7 +39,7 @@ if (!$user->admin) {
}
// Allow/Disallow change to clear passwords once passwords are encrypted
$allow_disable_encryption = true;
$allow_disable_encryption = false;
/*
@@ -102,8 +102,7 @@ if ($action == 'activate_encrypt') {
dol_print_error($db, '');
}
} elseif ($action == 'disable_encrypt') {
//On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas etre decodes
//Do not allow "disable encryption" as passwords cannot be decrypted
// By default, $allow_disable_encryption is false we do not allow to disable encryption because passwords can't be decoded once encrypted.
if ($allow_disable_encryption) {
dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED", $conf->entity);
}
@@ -411,17 +410,14 @@ if (!getDolGlobalString('DATABASE_PWD_ENCRYPTED')) {
print '<td class="center" width="100">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=activate_encrypt&token='.newToken().'">'.$langs->trans("Activate").'</a>';
print "</td>";
}
// Database conf file encryption
if (getDolGlobalString('DATABASE_PWD_ENCRYPTED')) {
} else {
print '<td class="center" width="100">';
if ($allow_disable_encryption) {
//On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas etre decodes
//Do not allow "disable encryption" as passwords cannot be decrypted
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=disable_encrypt&token='.newToken().'">'.$langs->trans("Disable").'</a>';
} else {
print '-';
print '<span class="opacitymedium">'.$langs->trans("Always").'</span>';
}
print "</td>";
}