summaryrefslogtreecommitdiffstats
path: root/apps/files_external/service/globalstoragesservice.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/service/globalstoragesservice.php')
-rw-r--r--apps/files_external/service/globalstoragesservice.php62
1 files changed, 0 insertions, 62 deletions
diff --git a/apps/files_external/service/globalstoragesservice.php b/apps/files_external/service/globalstoragesservice.php
index ec9b8e782fa..2d25288e7bc 100644
--- a/apps/files_external/service/globalstoragesservice.php
+++ b/apps/files_external/service/globalstoragesservice.php
@@ -33,68 +33,6 @@ use \OCA\Files_external\NotFoundException;
* Service class to manage global external storages
*/
class GlobalStoragesService extends StoragesService {
-
- /**
- * Write the storages to the configuration.
- *
- * @param array $storages map of storage id to storage config
- */
- public function writeConfig($storages) {
- // let the horror begin
- $mountPoints = [];
- foreach ($storages as $storageConfig) {
- $mountPoint = $storageConfig->getMountPoint();
- $oldBackendOptions = $storageConfig->getBackendOptions();
- $storageConfig->setBackendOptions(
- \OC_Mount_Config::encryptPasswords(
- $oldBackendOptions
- )
- );
-
- // system mount
- $rootMountPoint = '/$user/files/' . ltrim($mountPoint, '/');
-
- $applicableUsers = $storageConfig->getApplicableUsers();
- $applicableGroups = $storageConfig->getApplicableGroups();
- foreach ($applicableUsers as $applicable) {
- $this->addMountPoint(
- $mountPoints,
- \OC_Mount_Config::MOUNT_TYPE_USER,
- $applicable,
- $rootMountPoint,
- $storageConfig
- );
- }
-
- foreach ($applicableGroups as $applicable) {
- $this->addMountPoint(
- $mountPoints,
- \OC_Mount_Config::MOUNT_TYPE_GROUP,
- $applicable,
- $rootMountPoint,
- $storageConfig
- );
- }
-
- // if neither "applicableGroups" or "applicableUsers" were set, use "all" user
- if (empty($applicableUsers) && empty($applicableGroups)) {
- $this->addMountPoint(
- $mountPoints,
- \OC_Mount_Config::MOUNT_TYPE_USER,
- 'all',
- $rootMountPoint,
- $storageConfig
- );
- }
-
- // restore old backend options where the password was not encrypted,
- // because we don't want to change the state of the original object
- $storageConfig->setBackendOptions($oldBackendOptions);
- }
-
- $this->writeLegacyConfig($mountPoints);
- }
-
/**
* Triggers $signal for all applicable users of the given
* storage