mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-29 05:35:41 +00:00
11 lines
296 B
TypeScript
11 lines
296 B
TypeScript
import { User, UserRole } from 'database'
|
|
|
|
import { RoleNames } from '@enum/RoleNames'
|
|
|
|
export class UserLogic {
|
|
public constructor(private self: User) {}
|
|
public isRole(role: RoleNames): boolean {
|
|
return this.self.userRoles.some((value: UserRole) => value.role === role.toString())
|
|
}
|
|
}
|