From c565eb148da0d24c2759abc316c2304bfbd979b5 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 6 Dec 2023 17:36:29 +0200 Subject: [PATCH] ref --- client/src/acl-manager.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/src/acl-manager.js b/client/src/acl-manager.js index 050e54eb5b..6fd7b46c22 100644 --- a/client/src/acl-manager.js +++ b/client/src/acl-manager.js @@ -163,11 +163,16 @@ class AclManager { return null; } - if (typeof this.data.table[scope] !== 'object' || !(action in this.data.table[scope])) { + const scopeItem = this.data.table[scope]; + + if ( + typeof scopeItem !== 'object' || + !(action in scopeItem) + ) { return null; } - return this.data.table[scope][action]; + return scopeItem[action]; } /**