From 9f5591a19ced1890ddc26a6e629e443cfb19948b Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Wed, 16 Oct 2024 23:14:46 -0600 Subject: [PATCH] Adding support for auth group resource scopes --- .../java/org/computate/frFR/java/ConfigSite.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/computate/frFR/java/ConfigSite.java b/src/main/java/org/computate/frFR/java/ConfigSite.java index 632f3449..9f809827 100644 --- a/src/main/java/org/computate/frFR/java/ConfigSite.java +++ b/src/main/java/org/computate/frFR/java/ConfigSite.java @@ -1010,14 +1010,22 @@ public String regex(String motif, String texte, String valeurDefaut) { public JsonObject regexYamlObject(String champ, String texte) { Yaml yaml = new Yaml(); - Map map = yaml.load(regexYamlString(champ, texte)); - return new JsonObject(map); + String str = regexYamlString(champ, texte); + if(str != null) { + Map map = yaml.load(str); + return new JsonObject(map); + } + return null; } public JsonArray regexYamlArray(String champ, String texte) { Yaml yaml = new Yaml(); - List map = yaml.load(regexYamlString(champ, texte)); - return new JsonArray(map); + String str = regexYamlString(champ, texte); + if(str != null) { + List list = yaml.load(str); + return new JsonArray(list); + } + return null; } public String regexYamlString(String champ, String texte) {