PLT-6262 Add config setting to disable file attachments (#6301)

* Add config setting to disable file attachments

* Add unit tests

* Updating UI for no attachments (#6312)

* Update UI text on file upload System Console setting (#6313)

* Update storage_settings.jsx

* Update en.json
This commit is contained in:
Joram Wilander
2017-05-04 15:45:19 -04:00
committed by GitHub
parent 44a8f76d99
commit 49481caf6d
18 changed files with 179 additions and 68 deletions

View File

@@ -1,7 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import BrowserStore from 'stores/browser_store.jsx';
import UserStore from 'stores/user_store.jsx';
import TeamStore from 'stores/team_store.jsx';
@@ -21,6 +20,12 @@ const callTracker = {};
const ASYNC_CLIENT_TIMEOUT = 5000;
// Redux actions
import store from 'stores/redux_store.jsx';
const dispatch = store.dispatch;
const getState = store.getState;
import {setServerVersion} from 'mattermost-redux/actions/general';
export function dispatchError(err, method) {
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_ERROR,
@@ -47,17 +52,7 @@ function isCallInProgress(callName) {
}
export function checkVersion() {
var serverVersion = Client.getServerVersion();
if (serverVersion !== BrowserStore.getLastServerVersion()) {
if (!BrowserStore.getLastServerVersion() || BrowserStore.getLastServerVersion() === '') {
BrowserStore.setLastServerVersion(serverVersion);
} else {
BrowserStore.setLastServerVersion(serverVersion);
window.location.reload(true);
console.log('Detected version update refreshing the page'); //eslint-disable-line no-console
}
}
setServerVersion(Client.getServerVersion())(dispatch, getState);
}
export function getUser(userId, success, error) {