Skip to content

Commit

Permalink
agent: ensure service maintenance checks for matching partitions ahea…
Browse files Browse the repository at this point in the history
…d of other errors (#11788)

This matches behavior in most other agent api endpoints.
  • Loading branch information
rboyer authored and hc-github-team-consul-core committed Dec 9, 2021
1 parent 2bcd87c commit 328cc26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent/agent_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,10 @@ func (s *HTTPHandlers) AgentServiceMaintenance(resp http.ResponseWriter, req *ht

sid.Normalize()

if !s.validateRequestPartition(resp, &sid.EnterpriseMeta) {
return nil, nil
}

if err := s.agent.vetServiceUpdateWithAuthorizer(authz, sid); err != nil {
return nil, err
}
Expand Down

0 comments on commit 328cc26

Please sign in to comment.