fix for legacy custom roles

This commit is contained in:
Martin McKeaveney 2023-09-07 18:50:07 +01:00
parent 10e3cccb9f
commit ab5753273d
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ export async function getResourcePerms(
// update the various roleIds in the resource permissions // update the various roleIds in the resource permissions
for (let role of rolesList) { for (let role of rolesList) {
const rolePerms = allowsExplicitPerm const rolePerms = allowsExplicitPerm
? roles.checkForRoleResourceArray(role.permissions, resourceId) ? roles.checkForRoleResourceArray(role.permissions || {}, resourceId)
: {} : {}
if (rolePerms[resourceId]?.indexOf(level) > -1) { if (rolePerms[resourceId]?.indexOf(level) > -1) {
permissions[level] = { permissions[level] = {