(t testing.TB, db database.Store, org database.Organization, user database.User, template *database.Template)
| 479 | } |
| 480 | |
| 481 | func withGroupRestrictedTemplateACL(t testing.TB, db database.Store, org database.Organization, user database.User, template *database.Template) { |
| 482 | t.Helper() |
| 483 | |
| 484 | group := dbgen.Group(t, db, database.Group{OrganizationID: org.ID}) |
| 485 | dbgen.GroupMember(t, db, database.GroupMemberTable{ |
| 486 | GroupID: group.ID, |
| 487 | UserID: user.ID, |
| 488 | }) |
| 489 | template.GroupACL = database.TemplateACL{ |
| 490 | group.ID.String(): db2sdk.TemplateRoleActions(codersdk.TemplateRoleUse), |
| 491 | } |
| 492 | template.UserACL = database.TemplateACL{} |
| 493 | require.NoError(t, db.UpdateTemplateACLByID(context.Background(), database.UpdateTemplateACLByIDParams{ |
| 494 | ID: template.ID, |
| 495 | GroupACL: template.GroupACL, |
| 496 | UserACL: template.UserACL, |
| 497 | })) |
| 498 | } |
| 499 | |
| 500 | type devcontainerSubAgentDRPCClient struct { |
| 501 | proto.DRPCAgentClient28 |
nothing calls this directly
no test coverage detected