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

Method UpdateWorkspaceACLByID

coderd/database/dbauthz/dbauthz.go:7702–7712  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateWorkspaceACLByIDParams)

Source from the content-addressed store, hash-verified

7700}
7701
7702func (q *querier) UpdateWorkspaceACLByID(ctx context.Context, arg database.UpdateWorkspaceACLByIDParams) error {
7703 fetch := func(ctx context.Context, arg database.UpdateWorkspaceACLByIDParams) (database.WorkspaceTable, error) {
7704 w, err := q.db.GetWorkspaceByID(ctx, arg.ID)
7705 if err != nil {
7706 return database.WorkspaceTable{}, err
7707 }
7708 return w.WorkspaceTable(), nil
7709 }
7710
7711 return fetchAndExec(q.log, q.auth, policy.ActionShare, fetch, q.db.UpdateWorkspaceACLByID)(ctx, arg)
7712}
7713
7714func (q *querier) UpdateWorkspaceAgentConnectionByID(ctx context.Context, arg database.UpdateWorkspaceAgentConnectionByIDParams) error {
7715 if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceSystem); err != nil {

Callers

nothing calls this directly

Calls 3

fetchAndExecFunction · 0.85
WorkspaceTableMethod · 0.80
GetWorkspaceByIDMethod · 0.65

Tested by

no test coverage detected