1
0
Fork 0
mirror of synced 2024-09-28 15:21:28 +12:00

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 340d52dc38
commit 3631a799c3

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)
) {