[MM-51274] Remove deprecated PermissionUseSlashCommands (#22819)

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Ben Schumacher
2023-04-25 00:04:17 +02:00
коммит произвёл GitHub
родитель e8915b3182
Коммит f9836ee26a
11 изменённых файлов: 10 добавлений и 43 удалений

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

@@ -329,13 +329,6 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
// For compatibility reasons, PermissionCreatePost is also checked.
// TODO: Remove in 8.0: https://mattermost.atlassian.net/browse/MM-51274
if !c.App.SessionHasPermissionToChannel(c.AppContext, *c.AppContext.Session(), commandArgs.ChannelId, model.PermissionUseSlashCommands) {
c.SetPermissionError(model.PermissionUseSlashCommands)
return
}
channel, err := c.App.GetChannel(c.AppContext, commandArgs.ChannelId)
if err != nil {
c.Err = err
@@ -354,13 +347,6 @@ func executeCommand(c *Context, w http.ResponseWriter, r *http.Request) {
c.SetPermissionError(model.PermissionCreatePost)
return
}
// For compatibility reasons, PermissionCreatePost is also checked.
// TODO: Remove in 8.0: https://mattermost.atlassian.net/browse/MM-51274
if !c.App.SessionHasPermissionTo(*c.AppContext.Session(), model.PermissionUseSlashCommands) {
c.SetPermissionError(model.PermissionUseSlashCommands)
return
}
}
}