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

Method UpdateWorkspaceAgentDisplayAppsByID

coderd/database/dbauthz/dbauthz.go:7734–7745  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateWorkspaceAgentDisplayAppsByIDParams)

Source from the content-addressed store, hash-verified

7732}
7733
7734func (q *querier) UpdateWorkspaceAgentDisplayAppsByID(ctx context.Context, arg database.UpdateWorkspaceAgentDisplayAppsByIDParams) error {
7735 workspace, err := q.db.GetWorkspaceByAgentID(ctx, arg.ID)
7736 if err != nil {
7737 return err
7738 }
7739
7740 if err := q.authorizeContext(ctx, policy.ActionUpdateAgent, workspace); err != nil {
7741 return err
7742 }
7743
7744 return q.db.UpdateWorkspaceAgentDisplayAppsByID(ctx, arg)
7745}
7746
7747func (q *querier) UpdateWorkspaceAgentLifecycleStateByID(ctx context.Context, arg database.UpdateWorkspaceAgentLifecycleStateByIDParams) error {
7748 workspace, err := q.db.GetWorkspaceByAgentID(ctx, arg.ID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetWorkspaceByAgentIDMethod · 0.65

Tested by

no test coverage detected