forked from wrenn/wrenn
fix: admin capsule create audit log uses PlatformTeamID
POST /v1/admin/capsules was outside the injectPlatformTeam middleware subrouter, so audit entries landed under the admin's personal team.
This commit is contained in:
@ -55,6 +55,7 @@ func (h *adminCapsuleHandler) Create(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ac.TeamID = id.PlatformTeamID
|
||||||
h.audit.LogSandboxCreate(r.Context(), ac, sb.ID, sb.Template)
|
h.audit.LogSandboxCreate(r.Context(), ac, sb.ID, sb.Template)
|
||||||
writeJSON(w, http.StatusCreated, sandboxToResponse(sb))
|
writeJSON(w, http.StatusCreated, sandboxToResponse(sb))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user