[MM-21919] Add use_channel_mentions permission (#13781)
* MM-21919 Add channel_mention permission * MM-21919 Fix emojis migration test * Enforce Channel Mentions on the in the posts api * MM-21919 Rename permission to use_channel_mentions Allow posts with channel mentions to still be posted without the permission just don't send notifications to users * MM-21919 Add tests for a post with @all and @here * MM-21919 Add use channel mentions to all roles that have create post * MM-21919 Update app_test to include use_channel_mentions permission in default permissions
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a7854f1b97
Коммит
897715f883
@@ -187,6 +187,7 @@ func MakeDefaultRoles() map[string]*Role {
|
||||
PERMISSION_UPLOAD_FILE.Id,
|
||||
PERMISSION_EDIT_POST.Id,
|
||||
PERMISSION_CREATE_POST.Id,
|
||||
PERMISSION_USE_CHANNEL_MENTIONS.Id,
|
||||
PERMISSION_USE_SLASH_COMMANDS.Id,
|
||||
},
|
||||
SchemeManaged: true,
|
||||
@@ -205,6 +206,7 @@ func MakeDefaultRoles() map[string]*Role {
|
||||
PERMISSION_UPLOAD_FILE.Id,
|
||||
PERMISSION_GET_PUBLIC_LINK.Id,
|
||||
PERMISSION_CREATE_POST.Id,
|
||||
PERMISSION_USE_CHANNEL_MENTIONS.Id,
|
||||
PERMISSION_USE_SLASH_COMMANDS.Id,
|
||||
},
|
||||
SchemeManaged: true,
|
||||
@@ -253,6 +255,7 @@ func MakeDefaultRoles() map[string]*Role {
|
||||
Description: "authentication.roles.team_post_all.description",
|
||||
Permissions: []string{
|
||||
PERMISSION_CREATE_POST.Id,
|
||||
PERMISSION_USE_CHANNEL_MENTIONS.Id,
|
||||
},
|
||||
SchemeManaged: false,
|
||||
BuiltIn: true,
|
||||
@@ -264,6 +267,7 @@ func MakeDefaultRoles() map[string]*Role {
|
||||
Description: "authentication.roles.team_post_all_public.description",
|
||||
Permissions: []string{
|
||||
PERMISSION_CREATE_POST_PUBLIC.Id,
|
||||
PERMISSION_USE_CHANNEL_MENTIONS.Id,
|
||||
},
|
||||
SchemeManaged: false,
|
||||
BuiltIn: true,
|
||||
@@ -323,6 +327,7 @@ func MakeDefaultRoles() map[string]*Role {
|
||||
Description: "authentication.roles.system_post_all.description",
|
||||
Permissions: []string{
|
||||
PERMISSION_CREATE_POST.Id,
|
||||
PERMISSION_USE_CHANNEL_MENTIONS.Id,
|
||||
},
|
||||
SchemeManaged: false,
|
||||
BuiltIn: true,
|
||||
@@ -334,6 +339,7 @@ func MakeDefaultRoles() map[string]*Role {
|
||||
Description: "authentication.roles.system_post_all_public.description",
|
||||
Permissions: []string{
|
||||
PERMISSION_CREATE_POST_PUBLIC.Id,
|
||||
PERMISSION_USE_CHANNEL_MENTIONS.Id,
|
||||
},
|
||||
SchemeManaged: false,
|
||||
BuiltIn: true,
|
||||
|
||||
Ссылка в новой задаче
Block a user