Merge pull request #10108 from owncloud/files_external-allowed-backend
Only load personal external storages for allowed backends
This commit is contained in:
commit
5e2f627d3d
|
@ -238,17 +238,21 @@ class OC_Mount_Config {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$personalBackends = self::getPersonalBackends();
|
||||||
|
|
||||||
// Load personal mount points
|
// Load personal mount points
|
||||||
$mountConfig = self::readData($user);
|
$mountConfig = self::readData($user);
|
||||||
if (isset($mountConfig[self::MOUNT_TYPE_USER][$user])) {
|
if (isset($mountConfig[self::MOUNT_TYPE_USER][$user])) {
|
||||||
foreach ($mountConfig[self::MOUNT_TYPE_USER][$user] as $mountPoint => $options) {
|
foreach ($mountConfig[self::MOUNT_TYPE_USER][$user] as $mountPoint => $options) {
|
||||||
$options['personal'] = true;
|
if (isset($personalBackends[$options['class']])) {
|
||||||
$options['options'] = self::decryptPasswords($options['options']);
|
$options['personal'] = true;
|
||||||
|
$options['options'] = self::decryptPasswords($options['options']);
|
||||||
|
|
||||||
// Always override previous config
|
// Always override previous config
|
||||||
$options['priority_type'] = self::MOUNT_TYPE_PERSONAL;
|
$options['priority_type'] = self::MOUNT_TYPE_PERSONAL;
|
||||||
$options['backend'] = $backends[$options['class']]['backend'];
|
$options['backend'] = $backends[$options['class']]['backend'];
|
||||||
$mountPoints[$mountPoint] = $options;
|
$mountPoints[$mountPoint] = $options;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue