Manage SystemManagers
This commit is contained in:
@@ -61,4 +61,16 @@ export class UserRepository extends Repository<User> {
|
||||
const sso = await this.ssoRepo.findByExternalId(externalId);
|
||||
return user == null && sso == null;
|
||||
}
|
||||
|
||||
async deleteUserById(id: string) {
|
||||
const user = await this.findOne({
|
||||
where: { id },
|
||||
relations: ['external']
|
||||
});
|
||||
|
||||
if (user.external) {
|
||||
await this.ssoRepo.remove(user.external);
|
||||
}
|
||||
return this.softRemove(user)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user