Skip to content

Commit ca28cea

Browse files
committed
linting
1 parent 005dcd3 commit ca28cea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

coderd/workspaces.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ func createWorkspace(
528528
// Do this upfront to save work. If this fails, the rest of the work
529529
// would be wasted.
530530
if !api.Authorize(r, policy.ActionCreate,
531-
rbac.ResourceWorkspace.InOrg(template.OrganizationID).WithOwner(user.ID.String())) {
531+
rbac.ResourceWorkspace.InOrg(template.OrganizationID).WithOwner(owner.ID.String())) {
532532
httpapi.ResourceNotFound(rw)
533533
return
534534
}
@@ -588,7 +588,7 @@ func createWorkspace(
588588
// read other workspaces. Ideally we check the error on create and look for
589589
// a postgres conflict error.
590590
workspace, err := api.Database.GetWorkspaceByOwnerIDAndName(ctx, database.GetWorkspaceByOwnerIDAndNameParams{
591-
OwnerID: user.ID,
591+
OwnerID: owner.ID,
592592
Name: req.Name,
593593
})
594594
if err == nil {
@@ -621,7 +621,7 @@ func createWorkspace(
621621
ID: uuid.New(),
622622
CreatedAt: now,
623623
UpdatedAt: now,
624-
OwnerID: user.ID,
624+
OwnerID: owner.ID,
625625
OrganizationID: template.OrganizationID,
626626
TemplateID: template.ID,
627627
Name: req.Name,
@@ -689,8 +689,8 @@ func createWorkspace(
689689
ProvisionerJob: *provisionerJob,
690690
QueuePosition: 0,
691691
},
692-
user.Username,
693-
user.AvatarURL,
692+
owner.Username,
693+
owner.AvatarURL,
694694
[]database.WorkspaceResource{},
695695
[]database.WorkspaceResourceMetadatum{},
696696
[]database.WorkspaceAgent{},
@@ -712,8 +712,8 @@ func createWorkspace(
712712
workspace,
713713
apiBuild,
714714
template,
715-
user.Username,
716-
user.AvatarURL,
715+
owner.Username,
716+
owner.AvatarURL,
717717
api.Options.AllowWorkspaceRenames,
718718
)
719719
if err != nil {

0 commit comments

Comments
 (0)