@@ -9,7 +9,7 @@ import { UserToParticipantRole } from '../entities/UserToParticipantRole';
9
9
import { getTraceId } from '../helpers/loggingHelpers' ;
10
10
import { mapClientTypeToParticipantType } from '../helpers/siteConvertingHelpers' ;
11
11
import { getKcAdminClient } from '../keycloakAdminClient' ;
12
- import { enrichUserWithUid2Support } from '../middleware/usersMiddleware' ;
12
+ import { enrichUserWithSupportRoles } from '../middleware/usersMiddleware' ;
13
13
import { getSite } from './adminServiceClient' ;
14
14
import { getApiRoles } from './apiKeyService' ;
15
15
import {
@@ -37,15 +37,15 @@ export class UserService {
37
37
public async getCurrentUser ( req : UserRequest ) {
38
38
const userEmail = req . auth ?. payload ?. email as string ;
39
39
const user = await findUserByEmail ( userEmail ) ;
40
- const userWithUid2Support = await enrichUserWithUid2Support ( user ! ) ;
41
- if ( userWithUid2Support . isUid2Support ) {
40
+ const userWithSupportRoles = await enrichUserWithSupportRoles ( user ! ) ;
41
+ if ( userWithSupportRoles . isUid2Support ) {
42
42
const allParticipants = await getAllParticipants ( ) ;
43
- userWithUid2Support . participants = allParticipants ;
43
+ userWithSupportRoles . participants = allParticipants ;
44
44
}
45
- userWithUid2Support . participants = userWithUid2Support ?. participants ?. sort ( ( a , b ) =>
45
+ userWithSupportRoles . participants = userWithSupportRoles ?. participants ?. sort ( ( a , b ) =>
46
46
a . name . localeCompare ( b . name )
47
47
) ;
48
- return userWithUid2Support ;
48
+ return userWithSupportRoles ;
49
49
}
50
50
51
51
public async getDefaultParticipant ( req : UserRequest ) {
0 commit comments