diff --git a/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.jsx b/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.jsx index 9339bcdfb4df..41c165196ed6 100644 --- a/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.jsx +++ b/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.jsx @@ -7,7 +7,7 @@ import {FormattedMessage} from 'react-intl'; import Permissions from 'mattermost-redux/constants/permissions'; -import {PermissionsScope} from 'utils/constants.jsx'; +import {PermissionsScope, ModalIdentifiers} from 'utils/constants.jsx'; import {localizeMessage} from 'utils/utils.jsx'; import {t} from 'utils/i18n'; @@ -394,6 +394,7 @@ export default class PermissionTeamSchemeSettings extends React.Component {
{this.state.addTeamOpen && { - if (value.scheme_id !== null && value.scheme_id !== '' && !confirmed) { + if (this.props.modalID === ModalIdentifiers.ADD_TEAMS_TO_SCHEME && value.scheme_id !== null && value.scheme_id !== '' && !confirmed) { this.setState({confirmAddModal: true, confirmAddTeam: value}); return; } diff --git a/utils/constants.jsx b/utils/constants.jsx index 8f11d438f036..f9f9aba421bb 100644 --- a/utils/constants.jsx +++ b/utils/constants.jsx @@ -187,6 +187,7 @@ export const ModalIdentifiers = { REMOVED_FROM_CHANNEL: 'removed_from_channel', EMAIL_INVITE: 'email_invite', INTERACTIVE_DIALOG: 'interactive_dialog', + ADD_TEAMS_TO_SCHEME: 'add_teams_to_scheme', }; export const UserStatuses = {