From e05b95636b975dd119b19c14b48f291341464a19 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 2 Sep 2014 14:30:46 +0200 Subject: Fix upgrade process when apps enabled for specific groups Fix issue where the currently logged user was causing side-effects when upgrading. Now setting incognito mode (no user) on update to make sure the whole apps list is taken into account with getEnabledApps() or isEnabled(). --- core/ajax/update.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core') diff --git a/core/ajax/update.php b/core/ajax/update.php index 627ada080c8..1e280a82227 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -3,6 +3,10 @@ set_time_limit(0); require_once '../../lib/base.php'; if (OC::checkUpgrade(false)) { + // if a user is currently logged in, their session must be ignored to + // avoid side effects + \OC_User::setIncognitoMode(true); + $l = new \OC_L10N('core'); $eventSource = new OC_EventSource(); $updater = new \OC\Updater(\OC_Log::$object); -- cgit v1.2.3