Skip to content

Commit 4d16bfc

Browse files
committed
Update roles
1 parent 103ed1f commit 4d16bfc

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

coderd/rbac/object_gen.go

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/rbac/object_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,14 @@ func TestAllResources(t *testing.T) {
184184
var typeNames []string
185185
resources := rbac.AllResources()
186186
for _, r := range resources {
187-
if r.Type == "" {
188-
t.Errorf("empty type name: %s", r.Type)
187+
if r.RBACObject().Type == "" {
188+
t.Errorf("empty type name: %s", r.RBACObject().Type)
189189
continue
190190
}
191-
if slice.Contains(typeNames, r.Type) {
192-
t.Errorf("duplicate type name: %s", r.Type)
191+
if slice.Contains(typeNames, r.RBACObject().Type) {
192+
t.Errorf("duplicate type name: %s", r.RBACObject().Type)
193193
continue
194194
}
195-
typeNames = append(typeNames, r.Type)
195+
typeNames = append(typeNames, r.RBACObject().Type)
196196
}
197197
}

coderd/rbac/policy/policy.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ var RBACPermissions = map[string]PermissionDefinition{
244244
"assign_org_role": {
245245
Actions: map[Action]ActionDefinition{
246246
ActionAssign: actDef(0, "ability to assign org scoped roles"),
247+
ActionRead: actDef(0, "view what roles are assignable"),
247248
ActionDelete: actDef(0, "ability to delete org scoped roles"),
248249
},
249250
},

0 commit comments

Comments
 (0)