]> source.dussan.org Git - nextcloud-server.git/commitdiff
phpdoc
authorRobin Appelman <robin@icewind.nl>
Wed, 19 Oct 2016 13:11:58 +0000 (15:11 +0200)
committerRobin Appelman <robin@icewind.nl>
Wed, 16 Nov 2016 14:24:28 +0000 (15:24 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/App/AppManager.php
lib/private/Authentication/Token/DefaultToken.php
lib/private/Lockdown/LockdownManager.php
lib/private/legacy/app.php
lib/public/Lockdown/ILockdownManager.php

index 354f891828b302a97902d5b523924ceb7bd4293e..55fd575e1292edda6c996f053d2d1b704f2f3ca3 100644 (file)
@@ -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;
        }
index ea2414e6e156e7dfa53af2d00dd440065a6c4820..8e6774a0a22cdfd5eeafbbc21c86f772a577df8a 100644 (file)
@@ -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;
index c34f7e01b650d2126de6814d2f7f16d4da4ba576..5ce52a03683f8a3c676a412b725f1df4e3b02b6f 100644 (file)
@@ -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;
-               }
-       }
 }
index 5503b8b525c4015fdaad17bf2cfb19640330a883..c2ff9a5be3c07b344c066238bcc32ff22560252f 100644 (file)
@@ -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;
                }
 
index 0b0c525501ee99881957c6c7ca6c38cb3a177ee1..d4d05b37ff83c69cf4d792c4f2df726687c6eaed 100644 (file)
@@ -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);
 }