Fix role tests
This commit is contained in:
parent
cd8e667f39
commit
b0dc777af7
|
@ -380,8 +380,8 @@ export function getDBRoleID(roleName: string) {
|
||||||
export function getExternalRoleID(roleId: string, version?: string) {
|
export function getExternalRoleID(roleId: string, version?: string) {
|
||||||
// for built-in roles we want to remove the DB role ID element (role_)
|
// for built-in roles we want to remove the DB role ID element (role_)
|
||||||
if (
|
if (
|
||||||
(roleId.startsWith(DocumentType.ROLE) && isBuiltin(roleId)) ||
|
roleId.startsWith(DocumentType.ROLE) &&
|
||||||
version === RoleIDVersion.NAME
|
(isBuiltin(roleId) || version === RoleIDVersion.NAME)
|
||||||
) {
|
) {
|
||||||
return roleId.split(`${DocumentType.ROLE}${SEPARATOR}`)[1]
|
return roleId.split(`${DocumentType.ROLE}${SEPARATOR}`)[1]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue