Skip to content

Commit

Permalink
Merge branch 'rm/338992' into 'master'
Browse files Browse the repository at this point in the history
avoiding guestUser to see integration tab

See merge request kchat/webapp!819
  • Loading branch information
antonbuks committed Jul 9, 2024
2 parents c51830c + 01bbf0a commit be1268b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import classNames from 'classnames';
import React from 'react';
import {FormattedMessage, useIntl} from 'react-intl';
import {useSelector} from 'react-redux';

import {isCurrentUserGuestUser} from 'mattermost-redux/selectors/entities/users';

import {trackEvent} from 'actions/telemetry_actions';

Expand Down Expand Up @@ -58,6 +61,7 @@ const AddChannelDropdown = ({
server,
}: Props) => {
const intl = useIntl();
const isGuestUser = useSelector(isCurrentUserGuestUser);

const goToIntegration = () => {
getHistory().push(`/${server.name}/integrations`);
Expand Down Expand Up @@ -159,7 +163,7 @@ const AddChannelDropdown = ({
{createUserGroup}
</Menu.Group>
{createCategory}
{integration}
{!isGuestUser && integration}
{/* {invitePeople} */}
</>
);
Expand Down

0 comments on commit be1268b

Please sign in to comment.