MM-41969: Sends notifications of group mentions without LDAPGroups license feature. (#19598)

* MM-41969: Sends notifications of group mentions without LDAPGroups license feature.

* MM-41969: Improves tests.

* MM-41969: Removes redundant test.

* MM-41969: Test that group mention is not sent without license.

* MM-41969: Fix for incorrect test requirement.

* MM-41969: Change back to require.Nil.

* MM-41969: Fix lint.
Этот коммит содержится в:
mkraft
2022-02-18 20:01:05 -05:00
коммит произвёл GitHub
родитель d4378a6b42
Коммит e96daef1e1
2 изменённых файлов: 64 добавлений и 6 удалений

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

@@ -1041,7 +1041,7 @@ 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.Srv().License(); license == nil || !*license.Features.LDAPGroups {
if license := a.Srv().License(); license == nil || (license.SkuShortName != model.LicenseShortSkuProfessional && license.SkuShortName != model.LicenseShortSkuEnterprise) {
return false
}