MM-37417: Push notification authz fix. (#18009)
* MM-37417: Push notification authz fix. * MM-37417: Tests new app method.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
285de45988
Коммит
37b1e6d048
@@ -513,6 +513,11 @@ func pushNotificationAck(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if _, appErr := c.App.GetPostIfAuthorized(ack.PostId, c.AppContext.Session()); appErr != nil {
|
||||
c.Err = appErr
|
||||
return
|
||||
}
|
||||
|
||||
if !*c.App.Config().EmailSettings.SendPushNotifications {
|
||||
c.Err = model.NewAppError("pushNotificationAck", "api.push_notification.disabled.app_error", nil, "", http.StatusNotImplemented)
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user