summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-08-25 17:07:35 +0200
committerVincent Petry <pvince81@owncloud.com>2014-08-25 17:07:35 +0200
commit5e2f627d3d15a0635c6bc3718d6b80a711b2c5f4 (patch)
tree3b8616c108e7841d287fe729c6f37c566980ea51 /apps/files_external
parent992b0f9b0619c99b142e1e70d9ddae4a87d21c02 (diff)
parent73607e5d1637b4570c6deda94556e58e8bac6539 (diff)
downloadnextcloud-server-5e2f627d3d15a0635c6bc3718d6b80a711b2c5f4.tar.gz
nextcloud-server-5e2f627d3d15a0635c6bc3718d6b80a711b2c5f4.zip
Merge pull request #10108 from owncloud/files_external-allowed-backend
Only load personal external storages for allowed backends
Diffstat (limited to 'apps/files_external')
-rwxr-xr-xapps/files_external/lib/config.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 934f9a69032..c71132d0a5a 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -238,17 +238,21 @@ class OC_Mount_Config {
}
}
+ $personalBackends = self::getPersonalBackends();
+
// Load personal mount points
$mountConfig = self::readData($user);
if (isset($mountConfig[self::MOUNT_TYPE_USER][$user])) {
foreach ($mountConfig[self::MOUNT_TYPE_USER][$user] as $mountPoint => $options) {
- $options['personal'] = true;
- $options['options'] = self::decryptPasswords($options['options']);
+ if (isset($personalBackends[$options['class']])) {
+ $options['personal'] = true;
+ $options['options'] = self::decryptPasswords($options['options']);
- // Always override previous config
- $options['priority_type'] = self::MOUNT_TYPE_PERSONAL;
- $options['backend'] = $backends[$options['class']]['backend'];
- $mountPoints[$mountPoint] = $options;
+ // Always override previous config
+ $options['priority_type'] = self::MOUNT_TYPE_PERSONAL;
+ $options['backend'] = $backends[$options['class']]['backend'];
+ $mountPoints[$mountPoint] = $options;
+ }
}
}