Skip to content

Commit

Permalink
Adding support for auth group resource scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Oct 17, 2024
1 parent a492d71 commit 9f5591a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/main/java/org/computate/frFR/java/ConfigSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Object> map = yaml.load(regexYamlString(champ, texte));
return new JsonObject(map);
String str = regexYamlString(champ, texte);
if(str != null) {
Map<String, Object> map = yaml.load(str);
return new JsonObject(map);
}
return null;
}

public JsonArray regexYamlArray(String champ, String texte) {
Yaml yaml = new Yaml();
List<Object> map = yaml.load(regexYamlString(champ, texte));
return new JsonArray(map);
String str = regexYamlString(champ, texte);
if(str != null) {
List<Object> list = yaml.load(str);
return new JsonArray(list);
}
return null;
}

public String regexYamlString(String champ, String texte) {
Expand Down

0 comments on commit 9f5591a

Please sign in to comment.