honor safe_upgrade setting

Signed-off-by: Andy Miller <rhuk@mac.com>
This commit is contained in:
Andy Miller
2025-11-14 16:14:56 +00:00
parent 419ab56c00
commit bbed7e5478
7 changed files with 60 additions and 8 deletions

View File

@@ -385,6 +385,11 @@ class AdminPlugin extends Plugin
'direct-install' => [['admin.super'], 'PLUGIN_ADMIN.DIRECT_INSTALL'],
]);
$config = $this->grav['config'] ?? null;
if (!SafeUpgradeManager::configAllowsSafeUpgrade($config)) {
return;
}
try {
$manifestFiles = glob(GRAV_ROOT . '/user/data/upgrades/*.json') ?: [];