diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-08-25 17:07:35 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-08-25 17:07:35 +0200 |
commit | 5e2f627d3d15a0635c6bc3718d6b80a711b2c5f4 (patch) | |
tree | 3b8616c108e7841d287fe729c6f37c566980ea51 /apps/files_external | |
parent | 992b0f9b0619c99b142e1e70d9ddae4a87d21c02 (diff) | |
parent | 73607e5d1637b4570c6deda94556e58e8bac6539 (diff) | |
download | nextcloud-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-x | apps/files_external/lib/config.php | 16 |
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; + } } } |