1
0
Fork 0
mirror of synced 2024-10-03 19:43:32 +13:00

Fix role tests

This commit is contained in:
Adria Navarro 2023-09-06 01:34:39 +02:00
parent cd8e667f39
commit b0dc777af7

View file

@ -380,8 +380,8 @@ export function getDBRoleID(roleName: string) {
export function getExternalRoleID(roleId: string, version?: string) {
// for built-in roles we want to remove the DB role ID element (role_)
if (
(roleId.startsWith(DocumentType.ROLE) && isBuiltin(roleId)) ||
version === RoleIDVersion.NAME
roleId.startsWith(DocumentType.ROLE) &&
(isBuiltin(roleId) || version === RoleIDVersion.NAME)
) {
return roleId.split(`${DocumentType.ROLE}${SEPARATOR}`)[1]
}