Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf51fae7

Browse files
committed
linting
1 parent8967a42 commitf51fae7

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 (oorgRoleAssert)Assert(t*testing.T,orgID uuid.UUID,db database.Store,notMemberbool,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
iferr!=nil {
7677
returnxerrors.Errorf("get organizations by user id: %w",err)
@@ -241,7 +242,7 @@ func (s AGPLIDPSync) syncSiteWideRoles(ctx context.Context, tx database.Store, u
241242
returnnil
242243
}
243244

244-
func (sAGPLIDPSync)RolesFromClaim(fieldstring,claims jwt.MapClaims) ([]string,error) {
245+
func (AGPLIDPSync)RolesFromClaim(fieldstring,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
funcTestNoopNoDiff(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)

[8]ページ先頭

©2009-2025 Movatter.jp