diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-08-04 14:05:33 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-08-04 11:05:33 -0700 |
commit | fb2022fb1cb3c8023efd22316d570d9b26facbd1 (patch) | |
tree | d70450ccfc3bfed2d10c6bfcb943ddda164d9882 /webapp/components/admin_console | |
parent | 399865923658319d6d12a7719bc3b5554218bbad (diff) | |
download | chat-fb2022fb1cb3c8023efd22316d570d9b26facbd1.tar.gz chat-fb2022fb1cb3c8023efd22316d570d9b26facbd1.tar.bz2 chat-fb2022fb1cb3c8023efd22316d570d9b26facbd1.zip |
PLT-6924 Added ability to disable file uploads/downloads on old mobile apps (#7117)
Diffstat (limited to 'webapp/components/admin_console')
-rw-r--r-- | webapp/components/admin_console/storage_settings.jsx | 84 |
1 files changed, 48 insertions, 36 deletions
diff --git a/webapp/components/admin_console/storage_settings.jsx b/webapp/components/admin_console/storage_settings.jsx index 934a82f8f..4e0d9d19b 100644 --- a/webapp/components/admin_console/storage_settings.jsx +++ b/webapp/components/admin_console/storage_settings.jsx @@ -66,6 +66,53 @@ export default class StorageSettings extends AdminSettings { } renderSettings() { + const mobileUploadDownloadSettings = []; + if (window.mm_license.IsLicensed === 'true' && window.mm_license.Compliance === 'true') { + mobileUploadDownloadSettings.push( + <BooleanSetting + key='enableMobileUpload' + id='enableMobileUpload' + label={ + <FormattedMessage + id='admin.file.enableMobileUploadTitle' + defaultMessage='Allow File Uploads on Mobile:' + /> + } + helpText={ + <FormattedMessage + id='admin.file.enableMobileUploadDesc' + defaultMessage='When false, disables file uploads on mobile apps. If Allow File Sharing is set to true, users can still upload files from a mobile web browser.' + /> + } + value={this.state.enableMobileUpload} + onChange={this.handleChange} + disabled={!this.state.enableFileAttachments} + /> + ); + + mobileUploadDownloadSettings.push( + <BooleanSetting + key='enableMobileDownload' + id='enableMobileDownload' + label={ + <FormattedMessage + id='admin.file.enableMobileDownloadTitle' + defaultMessage='Allow File Downloads on Mobile:' + /> + } + helpText={ + <FormattedMessage + id='admin.file.enableMobileDownloadDesc' + defaultMessage='When false, disables file downloads on mobile apps. Users can still download files from a mobile web browser.' + /> + } + value={this.state.enableMobileDownload} + onChange={this.handleChange} + disabled={!this.state.enableFileAttachments} + /> + ); + } + return ( <SettingsGroup> <DropdownSetting @@ -222,42 +269,7 @@ export default class StorageSettings extends AdminSettings { value={this.state.enableFileAttachments} onChange={this.handleChange} /> - <BooleanSetting - id='enableMobileUpload' - label={ - <FormattedMessage - id='admin.file.enableMobileUploadTitle' - defaultMessage='Allow File Uploads on Mobile:' - /> - } - helpText={ - <FormattedMessage - id='admin.file.enableMobileUploadDesc' - defaultMessage='When false, disables file uploads on mobile apps. If Allow File Sharing is set to true, users can still upload files from a mobile web browser.' - /> - } - value={this.state.enableMobileUpload} - onChange={this.handleChange} - disabled={!this.state.enableFileAttachments} - /> - <BooleanSetting - id='enableMobileDownload' - label={ - <FormattedMessage - id='admin.file.enableMobileDownloadTitle' - defaultMessage='Allow File Downloads on Mobile:' - /> - } - helpText={ - <FormattedMessage - id='admin.file.enableMobileDownloadDesc' - defaultMessage='When false, disables file downloads on mobile apps. Users can still download files from a mobile web browser.' - /> - } - value={this.state.enableMobileDownload} - onChange={this.handleChange} - disabled={!this.state.enableFileAttachments} - /> + {mobileUploadDownloadSettings} <TextSetting id='maxFileSize' label={ |