Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

[MM-29684] Add check for isCloud to main_menu for displaying user_limit_modal #6792

Merged
merged 2 commits into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion components/main_menu/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';

import {getConfig} from 'mattermost-redux/selectors/entities/general';
import {
getConfig,
getLicense,
} from 'mattermost-redux/selectors/entities/general';
import {
getMyTeams,
getJoinableTeamIds,
Expand Down Expand Up @@ -105,6 +108,7 @@ function mapStateToProps(state) {
showNextStepsTips: showNextStepsTips(state),
showNextSteps: showNextSteps(state),
subscription: state.entities.cloud.subscription,
isCloud: getLicense(state).Cloud === 'true',
};
}

Expand Down
3 changes: 2 additions & 1 deletion components/main_menu/main_menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class MainMenu extends React.PureComponent {
intl: intlShape.isRequired,
showNextStepsTips: PropTypes.bool,
subscription: PropTypes.object,
isCloud: PropTypes.bool,
actions: PropTypes.shape({
openModal: PropTypes.func.isRequred,
showMentions: PropTypes.func,
Expand Down Expand Up @@ -134,7 +135,7 @@ class MainMenu extends React.PureComponent {
return false;
}

return (this.props.currentUsers >= this.props.userLimit) && (this.props.userLimit !== '0') && this.props.userIsAdmin;
return this.props.isCloud && (this.props.currentUsers >= this.props.userLimit) && (this.props.userLimit !== '0') && this.props.userIsAdmin;
}

render() {
Expand Down