diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-27 14:06:14 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-01 15:18:56 +0200 |
commit | db96b0bb0b67ceb99c49e131aef9f3d3f436a23c (patch) | |
tree | 68d1da15463c8afbc995a2281adbe8cdff5ada16 /apps/files_external | |
parent | f212c692ac5204fbea4639727db8e464152dba5d (diff) | |
download | nextcloud-server-db96b0bb0b67ceb99c49e131aef9f3d3f436a23c.tar.gz nextcloud-server-db96b0bb0b67ceb99c49e131aef9f3d3f436a23c.zip |
Make it possible to make external storages read only
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/js/settings.js | 12 | ||||
-rw-r--r-- | apps/files_external/lib/Command/ListCommand.php | 3 | ||||
-rw-r--r-- | apps/files_external/templates/settings.php | 1 |
3 files changed, 13 insertions, 3 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index ffe1e972071..983348397d1 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -48,6 +48,12 @@ var MOUNT_OPTIONS_DROPDOWN_TEMPLATE = ' <label for="mountOptionsEncoding">{{mountOptionsEncodingLabel}}</label>'+ ' </span>'+ ' </li>'+ + ' <li class="optionRow">' + + ' <span class="menuitem">' + + ' <input id="mountOptionsReadOnly" class="checkbox" name="readonly" type="checkbox" value="true"/>' + + ' <label for="mountOptionsReadOnly">{{t "files_external" "Read only"}}</label>' + + ' </span>' + + ' </li>' + ' </ul>'+ '</div>'; @@ -916,7 +922,8 @@ MountConfigListView.prototype = _.extend({ 'previews': true, 'enable_sharing': false, 'filesystem_check_changes': 1, - 'encoding_compatibility': false + 'encoding_compatibility': false, + 'readonly': false, })); } @@ -1303,7 +1310,8 @@ MountConfigListView.prototype = _.extend({ 'previews', 'filesystem_check_changes', 'enable_sharing', - 'encoding_compatibility' + 'encoding_compatibility', + 'readonly' ]; if (this._encryptionEnabled) { visibleOptions.push('encrypt'); diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php index efb2669e281..89bdcf5e5d6 100644 --- a/apps/files_external/lib/Command/ListCommand.php +++ b/apps/files_external/lib/Command/ListCommand.php @@ -192,7 +192,8 @@ class ListCommand extends Base { 'previews' => true, 'filesystem_check_changes' => 1, 'enable_sharing' => false, - 'encoding_compatibility' => false + 'encoding_compatibility' => false, + 'readonly' => false, ]; $rows = array_map(function (StorageConfig $config) use ($userId, $defaultMountOptions, $full) { $storageConfig = $config->getBackendOptions(); diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 895be719ab4..236faf37d6d 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -12,6 +12,7 @@ $l->t("Check for changes"); $l->t("Never"); $l->t("Once every direct access"); + $l->t('Read only'); script('files_external', 'settings'); style('files_external', 'settings'); |