Skip to content

Commit f51fae7

Browse files
committed
linting
1 parent 8967a42 commit f51fae7

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

coderd/idpsync/group_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ func (o orgGroupAssert) Assert(t *testing.T, orgID uuid.UUID, db database.Store,
906906
}
907907
}
908908

909+
//nolint:revive
909910
func (o orgRoleAssert) Assert(t *testing.T, orgID uuid.UUID, db database.Store, notMember bool, user database.User) {
910911
t.Helper()
911912

coderd/idpsync/role.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ func (s AGPLIDPSync) SyncRoles(ctx context.Context, db database.Store, user data
7070

7171
// sync roles per organization
7272
orgMemberships, err := tx.OrganizationMembers(ctx, database.OrganizationMembersParams{
73-
UserID: user.ID,
73+
OrganizationID: uuid.Nil,
74+
UserID: user.ID,
7475
})
7576
if err != nil {
7677
return xerrors.Errorf("get organizations by user id: %w", err)
@@ -241,7 +242,7 @@ func (s AGPLIDPSync) syncSiteWideRoles(ctx context.Context, tx database.Store, u
241242
return nil
242243
}
243244

244-
func (s AGPLIDPSync) RolesFromClaim(field string, claims jwt.MapClaims) ([]string, error) {
245+
func (AGPLIDPSync) RolesFromClaim(field string, claims jwt.MapClaims) ([]string, error) {
245246
rolesRow, ok := claims[field]
246247
if !ok {
247248
// If no claim is provided than we can assume the user is just

coderd/idpsync/role_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ func TestRoleSyncTable(t *testing.T) {
301301
// per organization. This limits the number of db calls to O(1) if there
302302
// are no changes. Which is the usual case, as user's roles do not change often.
303303
func TestNoopNoDiff(t *testing.T) {
304+
t.Parallel()
305+
304306
ctx := context.Background()
305307
ctrl := gomock.NewController(t)
306308
mDB := dbmock.NewMockStore(ctrl)

0 commit comments

Comments
 (0)