Finally do away with NewLocAppError function. (#7498)
This cleans up the few NewLocAppError calls that crept in since the main bulk of them were removed, and finally removes the NewLocAppError function altogether.
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
cff0c941f2
Коммит
d6b5b681ae
@@ -522,7 +522,7 @@ func (a *App) HandleIncomingWebhook(hookId string, req *model.IncomingWebhookReq
|
||||
|
||||
if utils.IsLicensed() && *utils.Cfg.TeamSettings.ExperimentalTownSquareIsReadOnly &&
|
||||
channel.Name == model.DEFAULT_CHANNEL {
|
||||
return model.NewLocAppError("HandleIncomingWebhook", "api.post.create_post.town_square_read_only", nil, "")
|
||||
return model.NewAppError("HandleIncomingWebhook", "api.post.create_post.town_square_read_only", nil, "", http.StatusForbidden)
|
||||
}
|
||||
|
||||
if channel.Type != model.CHANNEL_OPEN && !a.HasPermissionToChannel(hook.UserId, channel.Id, model.PERMISSION_READ_CHANNEL) {
|
||||
|
||||
Ссылка в новой задаче
Block a user