diff options
author | Robin Appelman <robin@icewind.nl> | 2016-10-19 15:11:58 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-11-16 15:24:28 +0100 |
commit | c5df58ec69af0f8ee48543df66f61e3090bdfb17 (patch) | |
tree | eb8638327afcc235fad5555963a59a2858770b5b | |
parent | 7e9e5db4963b2ce8e34b6b70347d9cc2dff3f88a (diff) | |
download | nextcloud-server-c5df58ec69af0f8ee48543df66f61e3090bdfb17.tar.gz nextcloud-server-c5df58ec69af0f8ee48543df66f61e3090bdfb17.zip |
phpdoc
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | lib/private/App/AppManager.php | 5 | ||||
-rw-r--r-- | lib/private/Authentication/Token/DefaultToken.php | 3 | ||||
-rw-r--r-- | lib/private/Lockdown/LockdownManager.php | 12 | ||||
-rw-r--r-- | lib/private/legacy/app.php | 2 | ||||
-rw-r--r-- | lib/public/Lockdown/ILockdownManager.php | 22 |
5 files changed, 22 insertions, 22 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index 354f891828b..55fd575e129 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -112,11 +112,6 @@ class AppManager implements IAppManager { return $value !== 'no'; }); ksort($this->installedAppsCache); - foreach ($this->installedAppsCache as $appId => $value) { - if (!\OC::$server->getLockdownManager()->canAccessApp($appId)) { - unset($this->installedAppsCache[$appId]); - } - } } return $this->installedAppsCache; } diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php index ea2414e6e15..8e6774a0a22 100644 --- a/lib/private/Authentication/Token/DefaultToken.php +++ b/lib/private/Authentication/Token/DefaultToken.php @@ -154,8 +154,7 @@ class DefaultToken extends Entity implements IToken { $scope = json_decode($this->getScope(), true); if (!$scope) { return [ - 'filesystem'=> true, - 'apps' => [] + 'filesystem'=> true ]; } return $scope; diff --git a/lib/private/Lockdown/LockdownManager.php b/lib/private/Lockdown/LockdownManager.php index c34f7e01b65..5ce52a03683 100644 --- a/lib/private/Lockdown/LockdownManager.php +++ b/lib/private/Lockdown/LockdownManager.php @@ -43,16 +43,4 @@ class LockdownManager implements ILockdownManager { } return !$this->scope || $this->scope['filesystem']; } - - public function canAccessApp($app) { - if (!$this->enabled) { - return true; - } - if ($this->scope && $this->scope['apps']) { - return in_array($app, $this->scope['apps']); - } else { - // no limit - return true; - } - } } diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 5503b8b525c..c2ff9a5be3c 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -140,7 +140,7 @@ class OC_App { public static function loadApp($app, $checkUpgrade = true) { self::$loadedApps[] = $app; $appPath = self::getAppPath($app); - if($appPath === false || !\OC::$server->getLockdownManager()->canAccessApp($app)) { + if($appPath === false) { return; } diff --git a/lib/public/Lockdown/ILockdownManager.php b/lib/public/Lockdown/ILockdownManager.php index 0b0c525501e..d4d05b37ff8 100644 --- a/lib/public/Lockdown/ILockdownManager.php +++ b/lib/public/Lockdown/ILockdownManager.php @@ -21,12 +21,30 @@ namespace OCP\Lockdown; use OC\Authentication\Token\IToken; +/** + * @since 9.2 + */ interface ILockdownManager { + /** + * Enable the lockdown restrictions + * + * @since 9.2 + */ public function enable(); + /** + * Set the active token to get the restrictions from and enable the lockdown + * + * @param IToken $token + * @since 9.2 + */ public function setToken(IToken $token); + /** + * Check whether or not filesystem access is allowed + * + * @return bool + * @since 9.2 + */ public function canAccessFilesystem(); - - public function canAccessApp($app); } |