Skip to content

Commit c558b5e

Browse files
committed
Add Topcoder User at initial creation instead of after user validation
1 parent e1a4f4a commit c558b5e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/api/user/user.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,10 @@ export class UserService {
953953
this.logger.log('Primary Role to be saved: ' + primaryRole);
954954
// assign primary role
955955
await this.roleService.assignRoleByName(primaryRole, userId, userId);
956+
// Assign 'Topcoder User' at the same time, to avoid weird issues after the first login
957+
if (primaryRole == 'Topcoder Talent') {
958+
await this.roleService.assignRoleByName('Topcoder User', userId, userId);
959+
}
956960
}
957961

958962
private async getNextUserId(): Promise<number> {

0 commit comments

Comments
 (0)