Browse Source

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.

master
mike12345567 5 years ago
parent
commit
6539feb6d7
  1. 1
      packages/server/src/api/controllers/permission.js

1
packages/server/src/api/controllers/permission.js

@ -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…
Cancel
Save