@@ -9,7 +9,7 @@ import { UserToParticipantRole } from '../entities/UserToParticipantRole';
99import { getTraceId } from '../helpers/loggingHelpers' ;
1010import { mapClientTypeToParticipantType } from '../helpers/siteConvertingHelpers' ;
1111import { getKcAdminClient } from '../keycloakAdminClient' ;
12- import { enrichUserWithUid2Support } from '../middleware/usersMiddleware' ;
12+ import { enrichUserWithSupportRoles } from '../middleware/usersMiddleware' ;
1313import { getSite } from './adminServiceClient' ;
1414import { getApiRoles } from './apiKeyService' ;
1515import {
@@ -37,15 +37,15 @@ export class UserService {
3737 public async getCurrentUser ( req : UserRequest ) {
3838 const userEmail = req . auth ?. payload ?. email as string ;
3939 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 ) {
4242 const allParticipants = await getAllParticipants ( ) ;
43- userWithUid2Support . participants = allParticipants ;
43+ userWithSupportRoles . participants = allParticipants ;
4444 }
45- userWithUid2Support . participants = userWithUid2Support ?. participants ?. sort ( ( a , b ) =>
45+ userWithSupportRoles . participants = userWithSupportRoles ?. participants ?. sort ( ( a , b ) =>
4646 a . name . localeCompare ( b . name )
4747 ) ;
48- return userWithUid2Support ;
48+ return userWithSupportRoles ;
4949 }
5050
5151 public async getDefaultParticipant ( req : UserRequest ) {
0 commit comments