Mm 64299 disable guest invite in abac channels (#31139)

* MM-64299 - disable guest invite in abac channels

* filter the abac channel list for guest

* add filter in the back-end too

* add proper translation

* simplify the condition for enforced channels and add the unit tests

* enhance validation for not inviting guest users when abac enforced channel

* add missing translation

* add value to empty translation

* prevent showing the channel name if abac protected
Этот коммит содержится в:
Pablo Vélez
2025-06-23 18:17:55 +02:00
коммит произвёл GitHub
родитель 82c1de2b4b
Коммит b3bc4b6f1b
13 изменённых файлов: 369 добавлений и 13 удалений

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

@@ -1499,7 +1499,13 @@ func (a *App) prepareInviteGuestsToChannels(teamID string, guestsInvite *model.G
if channel.TeamId != teamID {
return nil, nil, nil, model.NewAppError("prepareInviteGuestsToChannels", "api.team.invite_guests.channel_in_invalid_team.app_error", nil, "", http.StatusBadRequest)
}
// Check if the channel has access control policy enforcement
if channel.PolicyEnforced {
return nil, nil, nil, model.NewAppError("prepareInviteGuestsToChannels", "api.team.invite_guests.policy_enforced_channel.app_error", nil, "", http.StatusBadRequest)
}
}
return user, team, channels, nil
}