Rechtstexte und B2C-Vertragsabläufe absichern
This commit is contained in:
+7
-1
@@ -110,6 +110,12 @@ function app_feature_enabled(PDO $pdo, int $tenantId, string $featureKey): bool
|
||||
{
|
||||
static $cache = [];
|
||||
|
||||
// Export und Rückgabe der eigenen Daten sind Bestandteil von Vertrag und
|
||||
// AVV und dürfen nicht versehentlich im Back-Office abgeschaltet werden.
|
||||
if ($featureKey === 'data_export') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($tenantId <= 0) {
|
||||
return app_feature_default($featureKey);
|
||||
}
|
||||
@@ -141,7 +147,7 @@ function app_features_update(PDO $pdo, int $tenantId, array $submittedFeatures):
|
||||
);
|
||||
|
||||
foreach (array_keys(app_feature_catalog()) as $key) {
|
||||
$enabled = !empty($submittedFeatures[$key]);
|
||||
$enabled = $key === 'data_export' || !empty($submittedFeatures[$key]);
|
||||
$stmt->execute([$tenantId, $key, $enabled ? 1 : 0]);
|
||||
if (($before[$key] ?? true) !== $enabled) {
|
||||
$changed[] = $key;
|
||||
|
||||
Reference in New Issue
Block a user