diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-02-23 15:16:13 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-02-24 13:58:21 +0100 |
commit | 4829a2d421902e0edede30a71c96a86c576a17b1 (patch) | |
tree | 4fe9dc440688ac6c2160850e7d8f0d46dc77daf4 /apps/files_external/migration | |
parent | fae6643e6dd4bc308170e0ab45886f110f60a639 (diff) | |
download | nextcloud-server-4829a2d421902e0edede30a71c96a86c576a17b1.tar.gz nextcloud-server-4829a2d421902e0edede30a71c96a86c576a17b1.zip |
Disable sharing by default for external storage mounts
This is for newly created mount points.
Migrated mount points will have sharing enabled as before.
Diffstat (limited to 'apps/files_external/migration')
-rw-r--r-- | apps/files_external/migration/storagemigrator.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_external/migration/storagemigrator.php b/apps/files_external/migration/storagemigrator.php index ba81810a4fd..832807feb93 100644 --- a/apps/files_external/migration/storagemigrator.php +++ b/apps/files_external/migration/storagemigrator.php @@ -100,6 +100,12 @@ class StorageMigrator { $this->connection->beginTransaction(); try { foreach ($existingStorage as $storage) { + $mountOptions = $storage->getMountOptions(); + if (!empty($mountOptions) && !isset($mountOptions['enable_sharing'])) { + // existing mounts must have sharing enabled by default to avoid surprises + $mountOptions['enable_sharing'] = true; + $storage->setMountOptions($mountOptions); + } $storageService->addStorage($storage); } $this->connection->commit(); |