[release-10.11] MM-68547: Tighten authorization on group syncable link and patch endpoints (#36434)

Automatic Merge
Этот коммит содержится в:
Maria A Nunez
2026-05-06 02:53:51 -04:00
коммит произвёл GitHub
родитель 977c791e5b
Коммит 202d125afa
8 изменённых файлов: 1006 добавлений и 23 удалений

Просмотреть файл

@@ -417,17 +417,25 @@ class GroupDetails extends React.PureComponent<Props, State> {
roleChangeKey = (groupTeamOrChannel: {
type?: SyncableType;
id?: string;
team_id?: string;
channel_id?: string;
}) => {
let id;
if (
this.syncableTypeFromEntryType(groupTeamOrChannel.type) ===
SyncableType.Team
) {
id = groupTeamOrChannel.team_id;
} else {
id = groupTeamOrChannel.channel_id;
// Items in itemsToRemove use a generic `id`, while items coming from
// teamsToAdd/channelsToAdd use `team_id`/`channel_id`. The key must
// be identical regardless of source so the dedup in
// handleRemovedTeamsAndChannels and handleAddedTeamsAndChannels
// matches the key produced by onChangeRoles.
let id = groupTeamOrChannel.id;
if (!id) {
if (
this.syncableTypeFromEntryType(groupTeamOrChannel.type) ===
SyncableType.Team
) {
id = groupTeamOrChannel.team_id;
} else {
id = groupTeamOrChannel.channel_id;
}
}
return `${id}/${groupTeamOrChannel.type}`;
};