fix(audit): properly set old workspace in putWorkspaceTTL (#4251)

This commit is contained in:
Colin Adler 2022-09-28 16:50:21 -05:00 committed by GitHub
parent 574635f43d
commit 9339d597b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -638,6 +638,7 @@ func (api *API) putWorkspaceTTL(rw http.ResponseWriter, r *http.Request) {
})
)
defer commitAudit()
aReq.Old = workspace
if !api.Authorize(r, rbac.ActionUpdate, workspace) {
httpapi.ResourceNotFound(rw)