Skip to content

Commit 9aa13b8

Browse files
committed
Fixed POST, PATCH, DELETE APIs in pages
1 parent 071d066 commit 9aa13b8

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/main/java/org/computate/frFR/java/EcrirePageClasse.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4437,31 +4437,22 @@ else if(classeApiMethode.contains(i18nPage.getString(I18n.var_PUTCopie)))
44374437
String classeApiMethodeMethode = classeDoc.getString("classeApiMethode" + classeApiMethode + "_" + langueNom + "_stored_string");
44384438

44394439
if(classeApiMethode.equals("POST")) {
4440-
if(activerRoleAdmin) {
4441-
tl(0, "{% if ", i18nPage.getString(I18n.var_AUTH_PORTEE_ADMIN), " in ", i18nGlobale.getString(I18n.var_portees), " %}");
4442-
}
4440+
tl(0, "{%- if 'POST' in ", i18nGlobale.getString(I18n.var_portees), " %}");
44434441
tl(1, "{%- if ", varResultat, "Count >= 1 %}");
44444442
tl(2, "{{ htm", i18nPage.getString(I18n.var_Formulaire), "_", classeApiOperationIdMethode, "() }}");
44454443
tl(1, "{%- else %}");
44464444
tl(2, "{{ htm", i18nPage.getString(I18n.var_Formulaire), "_", classeApiOperationIdMethode, "() }}");
44474445
tl(1, "{%- endif %}");
4448-
if(activerRoleAdmin) {
4449-
tl(0, "{%- endif %}");
4450-
}
4446+
tl(0, "{%- endif %}");
44514447
} else if(classeApiMethode.equals("DELETE") || classeApiMethode.equals(i18nPage.getString(I18n.var_DELETEFiltre))) {
4452-
if(activerRoleAdmin) {
4453-
tl(0, "{% if ", i18nPage.getString(I18n.var_AUTH_PORTEE_ADMIN), " in ", i18nGlobale.getString(I18n.var_portees), " %}");
4454-
}
4448+
tl(0, "{%- if 'DELETE' in ", i18nGlobale.getString(I18n.var_portees), " %}");
44554449
tl(1, "{%- if ", varResultat, "Count >= 1 %}");
44564450
tl(2, "{{ htm", i18nPage.getString(I18n.var_Formulaire), "_", classeApiOperationIdMethode, "() }}");
44574451
tl(1, "{%- else %}");
44584452
tl(1, "{%- endif %}");
4459-
if(activerRoleAdmin) {
4460-
tl(0, "{%- endif %}");
4461-
}
4453+
tl(0, "{%- endif %}");
44624454
} else if(classeApiMethode.equals("PATCH")) {
4463-
tl(0, "{%- if ", i18nPage.getString(I18n.var_AUTH_PORTEE_SUPER_ADMIN), " in ", i18nGlobale.getString(I18n.var_portees), " %}");
4464-
tl(1, "{%- if ", varResultat, "Count > 0 %}");
4455+
tl(0, "{%- if 'DELETE' in ", i18nGlobale.getString(I18n.var_portees), " %}");
44654456
tl(2, "{{ htm", i18nPage.getString(I18n.var_Formulaire), "_", classeApiOperationIdMethode, "() }}");
44664457
tl(1, "{%- endif %}");
44674458
tl(0, "{%- endif %}");
@@ -4470,7 +4461,9 @@ else if(classeApiMethode.contains(i18nPage.getString(I18n.var_PUTCopie)))
44704461
tl(1, "{{ htm", i18nPage.getString(I18n.var_Formulaire), "_", classeApiOperationIdMethode, "() }}");
44714462
tl(0, "{%- endif %}");
44724463
} else if(classeApiMethode.equals(i18nPage.getString(I18n.var_PUTCopie))) {
4464+
tl(0, "{%- if ", i18nPage.getString(I18n.var_AUTH_PORTEE_SUPER_ADMIN), " in ", i18nGlobale.getString(I18n.var_portees), " %}");
44734465
tl(0, "{{ htm", i18nPage.getString(I18n.var_Formulaire), "_", classeApiOperationIdMethode, "() }}");
4466+
tl(0, "{%- endif %}");
44744467
}
44754468
}
44764469

0 commit comments

Comments
 (0)