Skip to content

Commit

Permalink
Access denied js fix (#586)
Browse files Browse the repository at this point in the history
* access denied fix

* return if role_definition is null
  • Loading branch information
michelson committed Jan 11, 2022
1 parent 8a601d1 commit 0a18ea1
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 147 deletions.
Expand Up @@ -11,6 +11,7 @@ export function allowedAccessTo(app, section, verb = 'read') {
const roleName = userRole.name;

const role_definition = app.availableRoles[roleName];
if (!role_definition) return null;
const res =
role_definition['manage']?.includes('all') ||
role_definition['manage']?.includes(section) ||
Expand Down

0 comments on commit 0a18ea1

Please sign in to comment.