mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
enum as null | undefined
This commit is contained in:
parent
ca82341592
commit
36e410a263
@ -855,7 +855,7 @@ const canEmailResend = (updatedAt: Date): boolean => {
|
||||
return !isTimeExpired(updatedAt, CONFIG.EMAIL_CODE_REQUEST_TIME)
|
||||
}
|
||||
|
||||
export function isUserInRole(user: DbUser, role: string): boolean {
|
||||
export function isUserInRole(user: DbUser, role: string | null | undefined): boolean {
|
||||
if (user && role) {
|
||||
for (const userRole of user.userRoles) {
|
||||
if (userRole.role === role) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user