We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent470c31c commitfa480cdCopy full SHA for fa480cd
coderd/httpmw/authz_test.go
@@ -11,6 +11,7 @@ import (
11
"github.com/coder/coder/v2/coderd/coderdtest"
12
"github.com/coder/coder/v2/coderd/database/dbauthz"
13
"github.com/coder/coder/v2/coderd/httpmw"
14
+"github.com/coder/coder/v2/coderd/rbac"
15
)
16
17
funcTestAsAuthzSystem(t*testing.T) {
@@ -34,7 +35,7 @@ func TestAsAuthzSystem(t *testing.T) {
34
35
actor,ok:=dbauthz.ActorFromContext(req.Context())
36
assert.True(t,ok,"actor should exist")
37
assert.False(t,userActor.Equal(actor),"systemActor should not be the user actor")
-assert.Contains(t,actor.Roles.Names(),"system","should have system role")
38
+assert.Contains(t,actor.Roles.Names(),rbac.RoleIdentifier{Name:"system"},"should have system role")
39
})
40
41
mwAssertUser:=mwAssert(func(req*http.Request) {