blob: 42feb11be26031d05645ccff7dcf9456d080b2a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import * as UserAgent from 'utils/user_agent';
export function canUploadFiles() {
if (window.mm_config.EnableFileAttachments === 'false') {
return false;
}
if (UserAgent.isMobileApp() && window.mm_license.IsLicensed === 'true' && window.mm_license.Compliance === 'true') {
return window.mm_config.EnableMobileFileUpload !== 'false';
}
return true;
}
export function canDownloadFiles() {
if (UserAgent.isMobileApp() && window.mm_license.IsLicensed === 'true' && window.mm_license.Compliance === 'true') {
return window.mm_config.EnableMobileFileDownload !== 'false';
}
return true;
}
|