agent: use http.StatusForbidden instead of 403

This commit is contained in:
Frank Schroeder 2017-08-23 16:28:54 +02:00 committed by Frank Schröder
parent 2e586be5aa
commit 970a7f97ec

View file

@ -65,7 +65,7 @@ func (s *HTTPServer) EventFire(resp http.ResponseWriter, req *http.Request) (int
// Try to fire the event // Try to fire the event
if err := s.agent.UserEvent(dc, token, event); err != nil { if err := s.agent.UserEvent(dc, token, event); err != nil {
if acl.IsErrPermissionDenied(err) { if acl.IsErrPermissionDenied(err) {
resp.WriteHeader(403) resp.WriteHeader(http.StatusForbidden) // 403
fmt.Fprint(resp, acl.ErrPermissionDenied.Error()) fmt.Fprint(resp, acl.ErrPermissionDenied.Error())
return nil, nil return nil, nil
} }