UIAngular/Client/src/app/interfaces/user.ts

16 lines
391 B
TypeScript

export class User {
id: number;
userName: string;
firstName: string;
lastName: string;
email: string;
verified: boolean;
emailVerified: boolean;
federated: boolean;
rights: string[];
canDo(right: string): boolean {
if (!this.rights || this.rights.length == 0) return false;
return this.rights.findIndex(r => r === right) > -1;
}
}