Skip to content

Commit

Permalink
Fix for nested visibleForGroups within tool options
Browse files Browse the repository at this point in the history
  • Loading branch information
jesade-vbg committed Jan 17, 2024
1 parent faf33a5 commit 77503ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion new-backend/server/apis/v2/services/config.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,10 @@ class ConfigServiceV2 {
for (const toolRef in mapConfig.tools) {
const options = mapConfig.tools[toolRef].options;
for (const optionRef in options) {
const groups = options[optionRef].visibleForGroups;
const groups =
options[optionRef] && typeof options[optionRef] === "object"
? options[optionRef]?.visibleForGroups
: null;
if (groups && groups.length > 0) {
const accessGranted = groups.some((group) => {
if (userGroups.indexOf(group) > -1) {
Expand Down

0 comments on commit 77503ee

Please sign in to comment.