This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove mm_config and mm_license global state from webapp, phase 2 (PR #3
) (#865) * MM-9635: expunge global mm_(license|config) from channel intro message component * MM-9635: pass isLicensed to isChannelAdmin * MM-9635: remove unused getWebsocketPort * MM-9635: pass enableEmailBatching to getEmailInterval * MM-9635: pass license and config to canDownloadFiles * MM-9635: pass license and config to checkIfMFARequired
- Loading branch information
1 parent
78180eb
commit 7036c4a
Showing
42 changed files
with
576 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved. | ||
// See License.txt for license information. | ||
|
||
import {connect} from 'react-redux'; | ||
import {getLicense, getConfig} from 'mattermost-redux/selectors/entities/general'; | ||
|
||
import {canDownloadFiles} from 'utils/file_utils.jsx'; | ||
|
||
import FileAttachment from './file_attachment.jsx'; | ||
|
||
function mapStateToProps(state) { | ||
const license = getLicense(state); | ||
const config = getConfig(state); | ||
|
||
return { | ||
canDownloadFiles: canDownloadFiles(license, config), | ||
}; | ||
} | ||
|
||
export default connect(mapStateToProps)(FileAttachment); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved. | ||
// See License.txt for license information. | ||
|
||
import {connect} from 'react-redux'; | ||
import {getLicense, getConfig} from 'mattermost-redux/selectors/entities/general'; | ||
|
||
import {canDownloadFiles} from 'utils/file_utils.jsx'; | ||
|
||
import FileInfoPreview from './file_info_preview.jsx'; | ||
|
||
function mapStateToProps(state) { | ||
const license = getLicense(state); | ||
const config = getConfig(state); | ||
|
||
return { | ||
canDownloadFiles: canDownloadFiles(license, config), | ||
}; | ||
} | ||
|
||
export default connect(mapStateToProps)(FileInfoPreview); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved. | ||
// See License.txt for license information. | ||
|
||
import {connect} from 'react-redux'; | ||
import {getLicense, getConfig} from 'mattermost-redux/selectors/entities/general'; | ||
|
||
import {checkIfMFARequired} from 'utils/route'; | ||
|
||
import LoggedIn from './logged_in.jsx'; | ||
|
||
function mapStateToProps(state, ownProps) { | ||
const license = getLicense(state); | ||
const config = getConfig(state); | ||
|
||
return { | ||
mfaRequired: checkIfMFARequired(license, config, ownProps.match.url), | ||
}; | ||
} | ||
|
||
export default connect(mapStateToProps)(LoggedIn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.