Skip to content

Commit d461a3d

Browse files
committed
test: fix roles_test PrebuiltWorkspace to have the PrebuildsSystemUserID as owner
1 parent 9d2bf8b commit d461a3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/rbac/roles_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package rbac_test
33
import (
44
"context"
55
"fmt"
6+
"github.com/coder/coder/v2/coderd/database"
67
"testing"
78

89
"github.com/google/uuid"
@@ -499,7 +500,7 @@ func TestRolePermissions(t *testing.T) {
499500
{
500501
Name: "PrebuiltWorkspace",
501502
Actions: []policy.Action{policy.ActionRead, policy.ActionUpdate, policy.ActionDelete},
502-
Resource: rbac.ResourcePrebuiltWorkspace.WithID(uuid.New()).InOrg(orgID).WithOwner(memberMe.Actor.ID),
503+
Resource: rbac.ResourcePrebuiltWorkspace.WithID(uuid.New()).InOrg(orgID).WithOwner(database.PrebuildsSystemUserID.String()),
503504
AuthorizeMap: map[bool][]hasAuthSubjects{
504505
true: {owner, orgAdmin, templateAdmin, orgTemplateAdmin},
505506
false: {setOtherOrg, userAdmin, memberMe, orgUserAdmin, orgAuditor, orgMemberMe},

0 commit comments

Comments
 (0)