diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-02 10:26:24 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-02 10:26:24 +0100 |
commit | 4777f78187cb758413db1b11f11ccb9304f12482 (patch) | |
tree | db14ca528a9617e356b97e724c273518a51a0dc3 /apps/files_external | |
parent | e60b217156aa0f2e037a3f9e23c8314e05cfbbd1 (diff) | |
parent | 279a54bc8790986bfc0d206c622f9c7c969a2da3 (diff) | |
download | nextcloud-server-4777f78187cb758413db1b11f11ccb9304f12482.tar.gz nextcloud-server-4777f78187cb758413db1b11f11ccb9304f12482.zip |
Merge pull request #20903 from owncloud/sharing-mount-option
Add mount option to disable sharing
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/js/settings.js | 8 | ||||
-rw-r--r-- | apps/files_external/tests/js/settingsSpec.js | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index ccb1e858fa0..233215a4aa1 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -23,6 +23,10 @@ var MOUNT_OPTIONS_DROPDOWN_TEMPLATE = ' <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"/>' + + ' <label for="mountOptionsSharing">{{t "files_external" "Enable sharing"}}</label>' + + ' </div>' + + ' <div class="optionRow">' + ' <label for="mountOptionsFilesystemCheck">{{t "files_external" "Check for changes"}}</label>' + ' <select id="mountOptionsFilesystemCheck" name="filesystem_check_changes" data-type="int">' + ' <option value="0">{{t "files_external" "Never"}}</option>' + @@ -35,6 +39,7 @@ var MOUNT_OPTIONS_DROPDOWN_TEMPLATE = templates therefore they are duplicated here t("files_external", "Enable encryption") t("files_external", "Enable previews") + t("files_external", "Enable sharing") t("files_external", "Check for changes") t("files_external", "Never") t("files_external", "Once every direct access") @@ -870,6 +875,7 @@ MountConfigListView.prototype = _.extend({ $tr.find('input.mountOptions').val(JSON.stringify({ 'encrypt': true, 'previews': true, + 'enable_sharing': true, 'filesystem_check_changes': 1 })); } @@ -1245,7 +1251,7 @@ MountConfigListView.prototype = _.extend({ var storage = this.getStorageConfig($tr); var $toggle = $tr.find('.mountOptionsToggle'); var dropDown = new MountOptionsDropdown(); - var enabledOptions = ['previews', 'filesystem_check_changes']; + var enabledOptions = ['previews', 'filesystem_check_changes', 'enable_sharing']; if (this._encryptionEnabled) { enabledOptions.push('encrypt'); } diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js index b2b5e1f57ec..72b186edf06 100644 --- a/apps/files_external/tests/js/settingsSpec.js +++ b/apps/files_external/tests/js/settingsSpec.js @@ -335,6 +335,7 @@ describe('OCA.External.Settings tests', function() { expect(JSON.parse($tr.find('input.mountOptions').val())).toEqual({ encrypt: true, previews: true, + enable_sharing: true, filesystem_check_changes: 0 }); }); |