summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-04-13 11:01:50 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-04-13 11:01:50 +0200
commit2454759af785e89b1852e381ad9249db98dd304b (patch)
tree9d90d3473b4b4ddf9d70cd1a0560bc8399069a39 /apps
parent982d2bcc5b829e7d9e8db5f1111570d80f537c5f (diff)
downloadnextcloud-server-2454759af785e89b1852e381ad9249db98dd304b.tar.gz
nextcloud-server-2454759af785e89b1852e381ad9249db98dd304b.zip
Check whether the user has permissions to add personal storage backends
Diffstat (limited to 'apps')
-rwxr-xr-xapps/files_external/lib/config.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 613f0b2609c..71f6ae78878 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -206,6 +206,12 @@ class OC_Mount_Config {
*/
public static function getPersonalBackends() {
+ // Check whether the user has permissions to add personal storage backends
+ // return an empty array if this is not the case
+ if(OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') !== 'yes') {
+ return array();
+ }
+
$backEnds = self::getBackends();
// Remove local storage and other disabled storages