' <label for="mountOptionsPreviews">{{t "files_external" "Enable previews"}}</label>' +
' </div>' +
' <div class="optionRow">' +
- ' <input id="mountOptionsSharing" name="enable_sharing" type="checkbox" value="true" checked="checked"/>' +
+ ' <input id="mountOptionsSharing" name="enable_sharing" type="checkbox" value="true"/>' +
' <label for="mountOptionsSharing">{{t "files_external" "Enable sharing"}}</label>' +
' </div>' +
' <div class="optionRow">' +
$tr.find('input.mountOptions').val(JSON.stringify({
'encrypt': true,
'previews': true,
- 'enable_sharing': true,
+ 'enable_sharing': false,
'filesystem_check_changes': 1
}));
}
$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();