fix: Add template read permission node to members (#1712)

This commit is contained in:
Steven Masley 2022-05-24 11:35:34 -05:00 committed by GitHub
parent 61ffd03aaf
commit 363b16af38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -121,7 +121,9 @@ func TestCreate(t *testing.T) {
coderdtest.AwaitTemplateVersionJob(t, client, version.ID)
_ = coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID)
cmd, root := clitest.New(t, "create", "my-workspace", "-y")
clitest.SetupConfig(t, client, root)
member := coderdtest.CreateAnotherUser(t, client, user.OrganizationID)
clitest.SetupConfig(t, member, root)
cmdCtx, done := context.WithTimeout(context.Background(), time.Second*3)
go func() {
defer done()

View File

@ -129,6 +129,12 @@ var (
Action: ActionRead,
ResourceID: "*",
},
{
// All org members can read templates in the org
ResourceType: ResourceTemplate.Type,
Action: ActionRead,
ResourceID: "*",
},
},
},
}