8000 feat(coderd/agentapi): allow inserting apps for sub agents by DanielleMaywood · Pull Request #18129 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat(coderd/agentapi): allow inserting apps for sub agents #18129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 5, 2025
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: remove TODO and AsSystemRestricted
  • Loading branch information
DanielleMaywood committed Jun 4, 2025
commit 360e667e7a3884c3cd9a0a921faac411fd07a13e
7 changes: 1 addition & 6 deletions coderd/agentapi/subagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,7 @@ func (a *SubAgentAPI) CreateSubAgent(ctx context.Context, req *agentproto.Create
openIn = database.WorkspaceAppOpenInTab
}

// TODO(DanielleMaywood):
// We should replace the use of `AsSystemRestricted` here.
// https://github.com/coder/coder/issues/18210
//
//nolint:gocritic // We've already inserted the agent with restricted permissions, so we're safe to do this.
_, err := a.Database.InsertWorkspaceApp(dbauthz.AsSystemRestricted(ctx), database.InsertWorkspaceAppParams{
_, err := a.Database.InsertWorkspaceApp(ctx, database.InsertWorkspaceAppParams{
ID: uuid.New(),
CreatedAt: createdAt,
AgentID: subAgent.ID,
Expand Down
0