[MM-24827] Disable group mentions on e10 or team edition (#14475)

* MM-24827 Disable group mentions when ldap groups not enabled

* Trigger CI

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Farhan Munshi
2020-05-08 14:19:01 -04:00
коммит произвёл GitHub
родитель 4c2d34b097
Коммит 0d1eb02341
2 изменённых файлов: 11 добавлений и 0 удалений

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

@@ -740,6 +740,10 @@ func (a *App) allowChannelMentions(post *model.Post, numProfiles int) bool {
// allowGroupMentions returns whether or not the group mentions are allowed for the given post.
func (a *App) allowGroupMentions(post *model.Post) bool {
if license := a.License(); license == nil || !*license.Features.LDAPGroups {
return false
}
if !a.HasPermissionToChannel(post.UserId, post.ChannelId, model.PERMISSION_USE_GROUP_MENTIONS) {
return false
}