mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
12 lines
334 B
TypeScript
12 lines
334 B
TypeScript
import { User } from '@entity/User'
|
|
import { UserRole } from '@entity/UserRole'
|
|
|
|
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())
|
|
}
|
|
}
|