MCPcopy Index your code
hub / github.com/coder/coder / UpdateWorkspaceAgentLogOverflowByID

Method UpdateWorkspaceAgentLogOverflowByID

coderd/database/dbauthz/dbauthz.go:7760–7776  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateWorkspaceAgentLogOverflowByIDParams)

Source from the content-addressed store, hash-verified

7758}
7759
7760func (q *querier) UpdateWorkspaceAgentLogOverflowByID(ctx context.Context, arg database.UpdateWorkspaceAgentLogOverflowByIDParams) error {
7761 agent, err := q.db.GetWorkspaceAgentByID(ctx, arg.ID)
7762 if err != nil {
7763 return err
7764 }
7765
7766 workspace, err := q.db.GetWorkspaceByAgentID(ctx, agent.ID)
7767 if err != nil {
7768 return err
7769 }
7770
7771 if err := q.authorizeContext(ctx, policy.ActionUpdate, workspace); err != nil {
7772 return err
7773 }
7774
7775 return q.db.UpdateWorkspaceAgentLogOverflowByID(ctx, arg)
7776}
7777
7778func (q *querier) UpdateWorkspaceAgentMetadata(ctx context.Context, arg database.UpdateWorkspaceAgentMetadataParams) error {
7779 // Fast path: Check if we have an RBAC object in context.

Callers

nothing calls this directly

Calls 4

authorizeContextMethod · 0.95
GetWorkspaceAgentByIDMethod · 0.65
GetWorkspaceByAgentIDMethod · 0.65

Tested by

no test coverage detected