Skip to content

Commit 71db49d

Browse files
committed
fmt
1 parent 52e097c commit 71db49d

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

coderd/database/db2sdk/db2sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ func RoleToRBAC(role codersdk.Role) rbac.Role {
553553
User: List(role.UserPermissions, PermissionToRBAC),
554554
}
555555
}
556+
556557
func PermissionToRBAC(permission codersdk.Permission) rbac.Permission {
557558
return rbac.Permission{
558559
Negate: permission.Negate,

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,8 @@ func (s *MethodTestSuite) TestUser() {
12131213
OrgPermissions: must(json.Marshal(map[string][]rbac.Permission{
12141214
orgID.String(): rbac.Permissions(map[string][]policy.Action{
12151215
rbac.ResourceTemplate.Type: {policy.ActionCreate, policy.ActionRead},
1216-
})})),
1216+
}),
1217+
})),
12171218
UserPermissions: must(json.Marshal(rbac.Permissions(map[string][]policy.Action{
12181219
rbac.ResourceWorkspace.Type: {policy.ActionRead},
12191220
}))),

coderd/rbac/roles.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func (names RoleNames) Names() []string {
5454
// site and orgs, and these functions can be removed.
5555

5656
func CustomSiteRole() string { return roleName(customSiteRole, "") }
57+
5758
func RoleOwner() string {
5859
return roleName(owner, "")
5960
}

coderd/rbac/rolestore/rolestore.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ import (
1111
"github.com/coder/coder/v2/coderd/rbac"
1212
)
1313

14-
type customRoleCtxKey struct{}
15-
type customRoleCache map[string]rbac.Role
14+
type (
15+
customRoleCtxKey struct{}
16+
customRoleCache map[string]rbac.Role
17+
)
1618

1719
func CustomRoleMW(next http.Handler) http.Handler {
1820
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

0 commit comments

Comments
 (0)