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:
parent
1366d824f7
commit
6539feb6d7
|
@ -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)
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue