Loading lib/AppInfo/Application.php +18 −12 Original line number Diff line number Diff line Loading @@ -83,10 +83,15 @@ class Application extends App implements IBootstrap { public function addStorageWrapper(): void { $userSession = \OC::$server->get(IUserSession::class); $currentUser = $userSession->getUser(); if ($currentUser !== null) { if ($currentUser === null) { Filesystem::addStorageWrapper('ecloud-accounts', [$this, 'addStorageWrapperCallback'], -10); return; } $groupManager = \OC::$server->get(IGroupManager::class); $groups = $groupManager->getUserGroups($currentUser); $hasAccess = false; if (!empty($groups)) { foreach ($groups as $group) { if($group->getGID() === "storage_enable") { Loading @@ -95,6 +100,7 @@ class Application extends App implements IBootstrap { } } } if(!$hasAccess) { Filesystem::addStorageWrapper('ecloud-accounts', [$this, 'addStorageWrapperCallback'], -10); } Loading Loading
lib/AppInfo/Application.php +18 −12 Original line number Diff line number Diff line Loading @@ -83,10 +83,15 @@ class Application extends App implements IBootstrap { public function addStorageWrapper(): void { $userSession = \OC::$server->get(IUserSession::class); $currentUser = $userSession->getUser(); if ($currentUser !== null) { if ($currentUser === null) { Filesystem::addStorageWrapper('ecloud-accounts', [$this, 'addStorageWrapperCallback'], -10); return; } $groupManager = \OC::$server->get(IGroupManager::class); $groups = $groupManager->getUserGroups($currentUser); $hasAccess = false; if (!empty($groups)) { foreach ($groups as $group) { if($group->getGID() === "storage_enable") { Loading @@ -95,6 +100,7 @@ class Application extends App implements IBootstrap { } } } if(!$hasAccess) { Filesystem::addStorageWrapper('ecloud-accounts', [$this, 'addStorageWrapperCallback'], -10); } Loading