diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-08-01 17:15:46 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-08-01 17:15:46 +0200 |
commit | 73607e5d1637b4570c6deda94556e58e8bac6539 (patch) | |
tree | f234cd6cef0c43b7e4fdba18c66376a8b7845680 /apps/files_external | |
parent | 8e6409a932c9f79901f22500b852372be9b650fd (diff) | |
download | nextcloud-server-73607e5d1637b4570c6deda94556e58e8bac6539.tar.gz nextcloud-server-73607e5d1637b4570c6deda94556e58e8bac6539.zip |
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; + } } } |