agent: ensure service maintenance checks for matching partitions ahead of other errors (#11788)

This matches behavior in most other agent api endpoints.
This commit is contained in:
R.B. Boyer 2021-12-09 10:05:02 -06:00 committed by GitHub
parent c410d295be
commit bb75e63eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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
}