mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore: join owner, template, and org in new workspace view (#15116)
Joins in fields like `username`, `avatar_url`, `organization_name`, `template_name` to `workspaces` via a **view**. The view must be maintained moving forward, but this prevents needing to add RBAC permissions to fetch related workspace fields.
This commit is contained in:
@ -29,7 +29,7 @@ func TestJFrogXrayScan(t *testing.T) {
|
||||
|
||||
tac, ta := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID, rbac.RoleTemplateAdmin())
|
||||
|
||||
wsResp := dbfake.WorkspaceBuild(t, db, database.Workspace{
|
||||
wsResp := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
|
||||
OrganizationID: owner.OrganizationID,
|
||||
OwnerID: ta.ID,
|
||||
}).WithAgent().Do()
|
||||
@ -85,7 +85,7 @@ func TestJFrogXrayScan(t *testing.T) {
|
||||
|
||||
memberClient, member := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID)
|
||||
|
||||
wsResp := dbfake.WorkspaceBuild(t, db, database.Workspace{
|
||||
wsResp := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
|
||||
OrganizationID: owner.OrganizationID,
|
||||
OwnerID: member.ID,
|
||||
}).WithAgent().Do()
|
||||
|
Reference in New Issue
Block a user