diff --git a/plugins/CoreUpdater/CoreUpdater.php b/plugins/CoreUpdater/CoreUpdater.php index c11e83d0706d8336121689f52abc2f3651a4c634..3404dc0bfea8c7a0c9775f7f16d946f47aca276c 100644 --- a/plugins/CoreUpdater/CoreUpdater.php +++ b/plugins/CoreUpdater/CoreUpdater.php @@ -41,9 +41,15 @@ class CoreUpdater extends \Piwik\Plugin $errors = array(); $deactivatedPlugins = array(); $coreError = false; - + if (!empty($componentsWithUpdateFile)) { - + $currentAccess = Access::getInstance(); + $hasSuperUserAccess = $currentAccess->hasSuperUserAccess(); + + if (!$hasSuperUserAccess) { + $currentAccess->setSuperUserAccess(true); + } + // if error in any core update, show message + help message + EXIT // if errors in any plugins updates, show them on screen, disable plugins that errored + CONTINUE // if warning in any core update or in any plugins update, show message + CONTINUE @@ -62,6 +68,10 @@ class CoreUpdater extends \Piwik\Plugin } } } + + if (!$hasSuperUserAccess) { + $currentAccess->setSuperUserAccess(false); + } } Filesystem::deleteAllCacheOnUpdate(); diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI index 38d0e627a91b1625d33575ec9f712a19c529410e..9531b019cbcaedc1bbf613d14032e7bd0b839ff8 160000 --- a/tests/PHPUnit/UI +++ b/tests/PHPUnit/UI @@ -1 +1 @@ -Subproject commit 38d0e627a91b1625d33575ec9f712a19c529410e +Subproject commit 9531b019cbcaedc1bbf613d14032e7bd0b839ff8