Skip to content

Commit 381c5ca

Browse files
chore: ActionCreateAgent -> ActionUpdate
1 parent 2799228 commit 381c5ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

coderd/database/dbauthz/dbauthz.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3860,7 +3860,7 @@ func (q *querier) InsertWorkspaceApp(ctx context.Context, arg database.InsertWor
38603860
return database.WorkspaceApp{}, err
38613861
}
38623862

3863-
if err := q.authorizeContext(ctx, policy.ActionCreateAgent, workspace); err != nil {
3863+
if err := q.authorizeContext(ctx, policy.ActionUpdate, workspace); err != nil {
38643864
return database.WorkspaceApp{}, err
38653865
}
38663866

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4114,7 +4114,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
41144114
Health: database.WorkspaceAppHealthDisabled,
41154115
SharingLevel: database.AppSharingLevelOwner,
41164116
OpenIn: database.WorkspaceAppOpenInSlimWindow,
4117-
}).Asserts(ws, policy.ActionCreateAgent)
4117+
}).Asserts(ws, policy.ActionUpdate)
41184118
}))
41194119
s.Run("InsertWorkspaceResourceMetadata", s.Subtest(func(db database.Store, check *expects) {
41204120
check.Args(database.InsertWorkspaceResourceMetadataParams{

0 commit comments

Comments
 (0)