Fixing issue with permissions, if some permissions have already been set for a role an error would be thrown which would break the UI and make it impossible to setup permissions for other tables.

This commit is contained in:
mike12345567 2021-10-19 16:19:48 +01:00
parent 1366d824f7
commit 6539feb6d7
1 changed files with 1 additions and 0 deletions

View File

@ -147,6 +147,7 @@ exports.getResourcePerms = async function (ctx) {
const rolePerms = role.permissions
if (
rolePerms &&
rolePerms[resourceId] &&
(rolePerms[resourceId] === level ||
rolePerms[resourceId].indexOf(level) !== -1)
) {