RED-4963 - added new 'active' property to can enable/disable user without losing it's roles

This commit is contained in:
Valentin Mihai 2022-08-11 14:43:06 +03:00
parent bff991ac62
commit 2698e62e41
2 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,7 @@ export class IqserUser implements IIqserUser, IListable {
readonly lastName?: string;
readonly name: string;
readonly searchKey: string;
readonly active?: boolean;
readonly hasAnyRole = this.roles.length > 0;
@ -21,6 +22,7 @@ export class IqserUser implements IIqserUser, IListable {
this.firstName = user.firstName;
this.lastName = user.lastName;
this.name = this.firstName && this.lastName ? `${this.firstName} ${this.lastName}` : this.username;
this.active = (user as IIqserUser).active;
this.searchKey = `${this.name || '-'}${this.username || '-'}${this.email || ''}`;
}

View File

@ -7,4 +7,5 @@ export interface IIqserUser {
readonly email?: string;
readonly firstName?: string;
readonly lastName?: string;
readonly active?: boolean;
}