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
340d52dc38
commit
3631a799c3
|
@ -147,6 +147,7 @@ exports.getResourcePerms = async function (ctx) {
|
||||||
const rolePerms = role.permissions
|
const rolePerms = role.permissions
|
||||||
if (
|
if (
|
||||||
rolePerms &&
|
rolePerms &&
|
||||||
|
rolePerms[resourceId] &&
|
||||||
(rolePerms[resourceId] === level ||
|
(rolePerms[resourceId] === level ||
|
||||||
rolePerms[resourceId].indexOf(level) !== -1)
|
rolePerms[resourceId].indexOf(level) !== -1)
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue