Unverified Commit cfe74bf3 authored by Nev Angelova's avatar Nev Angelova Committed by GitHub
Browse files

[MM-26450] - Pass correct permissions to channel member (#5859)


Co-authored-by: default avatarNevyana Angelova <nevyangelova@Nevyanas-MacBook-Pro-2.local>
parent d5b5d790
......@@ -10,7 +10,7 @@ import Permissions from 'mattermost-redux/constants/permissions';
import {getMyChannelMemberships, getCurrentUserId} from 'mattermost-redux/selectors/entities/common';
import {makeGetCategoriesForTeam, getCategoryInTeamWithChannel} from 'mattermost-redux/selectors/entities/channel_categories';
import {getMyPreferences} from 'mattermost-redux/selectors/entities/preferences';
import {haveITeamPermission} from 'mattermost-redux/selectors/entities/roles';
import {haveIChannelPermission} from 'mattermost-redux/selectors/entities/roles';
import {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams';
import {ActionFunc} from 'mattermost-redux/types/actions';
import {Channel} from 'mattermost-redux/types/channels';
......@@ -43,8 +43,8 @@ function makeMapStateToProps() {
let currentCategory;
if (currentTeam) {
managePublicChannelMembers = haveITeamPermission(state, {team: currentTeam.id, permission: Permissions.MANAGE_PUBLIC_CHANNEL_MEMBERS});
managePrivateChannelMembers = haveITeamPermission(state, {team: currentTeam.id, permission: Permissions.MANAGE_PRIVATE_CHANNEL_MEMBERS});
managePublicChannelMembers = haveIChannelPermission(state, {channel: ownProps.channel.id, team: currentTeam.id, permission: Permissions.MANAGE_PUBLIC_CHANNEL_MEMBERS});
managePrivateChannelMembers = haveIChannelPermission(state, {channel: ownProps.channel.id, team: currentTeam.id, permission: Permissions.MANAGE_PRIVATE_CHANNEL_MEMBERS});
categories = getCategoriesForTeam(state, currentTeam.id);
currentCategory = getCategoryInTeamWithChannel(state, currentTeam.id, ownProps.channel.id);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment