From 8053150315983dd2ebf42ca30960f535eba344a1 Mon Sep 17 00:00:00 2001 From: gaetanbrl Date: Mon, 25 Sep 2023 14:21:11 +0200 Subject: [PATCH] fix cfg roles list name --- configs/localConfig.json | 2 +- js/extension/stateManagement/selector/selector.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/localConfig.json b/configs/localConfig.json index 755a41f..6362cc5 100644 --- a/configs/localConfig.json +++ b/configs/localConfig.json @@ -358,7 +358,7 @@ "cfg": { "icon": "tint", "id": "carteaux", - "role": "SV_PWRS_CARTEAUX_CAR", + "editingAllowedRoles": ["SV_PWRS_CARTEAUX_CAR"], "api": "http://localhost:8081/files", "statusValues": {"values":["public","private"]}, "fields": ["label", "", "comment", "status", "dateDoc"], diff --git a/js/extension/stateManagement/selector/selector.js b/js/extension/stateManagement/selector/selector.js index eb1c268..37598e6 100644 --- a/js/extension/stateManagement/selector/selector.js +++ b/js/extension/stateManagement/selector/selector.js @@ -57,7 +57,7 @@ export const getUploadVisibility = (state) => export const getAuthLevel = (state) => { const groups = userGroupSecuritySelector(state) ?? []; const groupNames = groups.map(({ groupName }) => groupName); - let allowedRoles = getPluginCfg(state)?.allowedRoles; + let allowedRoles = getPluginCfg(state)?.editingAllowedRoles; if (isEmpty(allowedRoles)) { allowedRoles = ["MAPSTORE_ADMIN"]; }