mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: pass context with authorization to agentapi (#20959)
The agentapi context needs to be a context with some amount of authorization attached to it via the context so that the cache refresh routine can fetch the workspace from the db via GetWorkspaceForAgentID. --------- Signed-off-by: Callum Styan <callumstyan@gmail.com>
This commit is contained in:
@@ -132,7 +132,7 @@ func (api *API) workspaceAgentRPC(rw http.ResponseWriter, r *http.Request) {
|
||||
WorkspaceID: workspace.ID,
|
||||
OrganizationID: workspace.OrganizationID,
|
||||
|
||||
Ctx: api.ctx,
|
||||
AuthenticatedCtx: ctx,
|
||||
Log: logger,
|
||||
Clock: api.Clock,
|
||||
Database: api.Database,
|
||||
|
||||
Reference in New Issue
Block a user