mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: remove rbac psuedo resources, add custom verbs (#13276)
Removes our pseudo rbac resources like `WorkspaceApplicationConnect` in favor of additional verbs like `ssh`. This is to make more intuitive permissions for building custom roles. The source of truth is now `policy.go`
This commit is contained in:
@@ -184,14 +184,14 @@ func TestAllResources(t *testing.T) {
|
||||
var typeNames []string
|
||||
resources := rbac.AllResources()
|
||||
for _, r := range resources {
|
||||
if r.Type == "" {
|
||||
t.Errorf("empty type name: %s", r.Type)
|
||||
if r.RBACObject().Type == "" {
|
||||
t.Errorf("empty type name: %s", r.RBACObject().Type)
|
||||
continue
|
||||
}
|
||||
if slice.Contains(typeNames, r.Type) {
|
||||
t.Errorf("duplicate type name: %s", r.Type)
|
||||
if slice.Contains(typeNames, r.RBACObject().Type) {
|
||||
t.Errorf("duplicate type name: %s", r.RBACObject().Type)
|
||||
continue
|
||||
}
|
||||
typeNames = append(typeNames, r.Type)
|
||||
typeNames = append(typeNames, r.RBACObject().Type)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user