Skip to content

Commit ef15908

Browse files
committed
fix rbac merge woes
1 parent 5c6344f commit ef15908

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

coderd/rbac/builtin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,12 @@ func roleSplit(role string) (name string, orgID string, err error) {
398398
// and actions a bit easier.
399399
func permissions(perms map[string][]Action) []Permission {
400400
list := make([]Permission, 0, len(perms))
401-
for objectType, actions := range perms {
401+
for k, actions := range perms {
402402
for _, act := range actions {
403403
act := act
404404
list = append(list, Permission{
405405
Negate: false,
406-
ResourceType: objectType,
406+
ResourceType: k,
407407
Action: act,
408408
})
409409
}

coderd/rbac/scopes.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ var builtinScopes map[Scope]Role = map[Scope]Role{
1919
ScopeAll: {
2020
Name: fmt.Sprintf("Scope_%s", ScopeAll),
2121
DisplayName: "All operations",
22-
Site: permissions(map[Object][]Action{
23-
ResourceWildcard: {WildcardSymbol},
22+
Site: permissions(map[string][]Action{
23+
ResourceWildcard.Type: {WildcardSymbol},
2424
}),
2525
Org: map[string][]Permission{},
2626
User: []Permission{},
@@ -29,8 +29,8 @@ var builtinScopes map[Scope]Role = map[Scope]Role{
2929
ScopeApplicationConnect: {
3030
Name: fmt.Sprintf("Scope_%s", ScopeApplicationConnect),
3131
DisplayName: "Ability to connect to applications",
32-
Site: permissions(map[Object][]Action{
33-
ResourceWorkspaceApplicationConnect: {ActionCreate},
32+
Site: permissions(map[string][]Action{
33+
ResourceWorkspaceApplicationConnect.Type: {ActionCreate},
3434
}),
3535
Org: map[string][]Permission{},
3636
User: []Permission{},

0 commit comments

Comments
 (0)