You've already forked mattermost-webapp
mirror of
https://github.com/zerotier/mattermost-webapp.git
synced 2026-05-22 16:23:25 -07:00
84adb4e5a5
* merge changes from MM-14748 * Allow to invalidate email invites (#2541) * style issues, some missed settings * Delete commented line * update snapshots, tests * fix i18n strings, camelCasing, naming * also update snapshots * fix loading integrations in sidebar * Title edits per feedback * Hide settings if RestrictSystemAdmin enabled * refactor some logic for rendering menus * content edits * update snapshots, unit tests * Page name “Compliance Settings” to “Compliance” * Fix routing issues * redirects to default route none defined * redirects to default if route is hidden in LHS * update tests/snapshots * buildEnterpriseReady in router * GIF (Beta) for page name; rebase * Update snapshot * fix Gif title string in translation file * refactor admin routes w/ reduce/filter * Re-organize system console sections * Fix some i18n IDs & strings
50 lines
1.9 KiB
JavaScript
50 lines
1.9 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {connect} from 'react-redux';
|
|
import {bindActionCreators} from 'redux';
|
|
import {getConfig, getEnvironmentConfig} from 'mattermost-redux/actions/admin';
|
|
import {loadRolesIfNeeded, editRole} from 'mattermost-redux/actions/roles';
|
|
import * as Selectors from 'mattermost-redux/selectors/entities/admin';
|
|
import {withRouter} from 'react-router-dom';
|
|
import {getConfig as getGeneralConfig, getLicense} from 'mattermost-redux/selectors/entities/general';
|
|
import {getRoles} from 'mattermost-redux/selectors/entities/roles';
|
|
import {isCurrentUserSystemAdmin} from 'mattermost-redux/selectors/entities/users';
|
|
|
|
import {setNavigationBlocked, deferNavigation, cancelNavigation, confirmNavigation} from 'actions/admin_actions.jsx';
|
|
import {getNavigationBlocked, showNavigationPrompt} from 'selectors/views/admin';
|
|
|
|
import AdminConsole from './admin_console.jsx';
|
|
|
|
function mapStateToProps(state) {
|
|
const generalConfig = getGeneralConfig(state);
|
|
const buildEnterpriseReady = generalConfig.BuildEnterpriseReady === 'true';
|
|
|
|
return {
|
|
config: Selectors.getConfig(state),
|
|
license: getLicense(state),
|
|
buildEnterpriseReady,
|
|
navigationBlocked: getNavigationBlocked(state),
|
|
showNavigationPrompt: showNavigationPrompt(state),
|
|
isCurrentUserSystemAdmin: isCurrentUserSystemAdmin(state),
|
|
roles: getRoles(state),
|
|
};
|
|
}
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
actions: bindActionCreators({
|
|
getConfig,
|
|
getEnvironmentConfig,
|
|
setNavigationBlocked,
|
|
deferNavigation,
|
|
cancelNavigation,
|
|
confirmNavigation,
|
|
loadRolesIfNeeded,
|
|
editRole,
|
|
}, dispatch),
|
|
};
|
|
}
|
|
|
|
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(AdminConsole));
|