add role with id 3 as 'No access' in transformation
This commit is contained in:
parent
a1f04bc367
commit
2999beb5be
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,8 @@ const transformRoleById = (roleId: any): UserRole => {
|
||||||
return UserRole.Admin;
|
return UserRole.Admin;
|
||||||
case 2:
|
case 2:
|
||||||
return UserRole.User;
|
return UserRole.User;
|
||||||
|
case 3:
|
||||||
|
return UserRole.NoAccess;
|
||||||
default:
|
default:
|
||||||
return UserRole.NoAccess;
|
return UserRole.NoAccess;
|
||||||
}
|
}
|
||||||
|
@ -17,6 +19,8 @@ const transformRoleIdByRole = (role: UserRole | null): number | null => {
|
||||||
return 1;
|
return 1;
|
||||||
case UserRole.User:
|
case UserRole.User:
|
||||||
return 2;
|
return 2;
|
||||||
|
case UserRole.NoAccess:
|
||||||
|
return 3;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue