Skip to content

Commit 071d066

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

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

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

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4393,33 +4393,25 @@ else if(classeApiMethode.contains(i18nPage.getString(I18n.var_PUTCopie)))
43934393
String classeApiMethodeMethode = classeDoc.getString("classeApiMethode" + classeApiMethode + "_" + langueNom + "_stored_string");
43944394

43954395
if(classeApiMethode.equals("POST")) {
4396-
if(activerRoleAdmin) {
4397-
tl(0, "{% if ", i18nPage.getString(I18n.var_AUTH_PORTEE_ADMIN), " in ", i18nGlobale.getString(I18n.var_portees), " %}");
4398-
}
4396+
tl(0, "{%- if 'POST' in ", i18nGlobale.getString(I18n.var_portees), " %}");
43994397
tl(1, "{%- if ", varResultat, "Count >= 1 %}");
44004398
tl(2, "{{ htm", i18nPage.getString(I18n.var_Bouton), "_", classeApiOperationIdMethode, "() }}");
44014399
tl(1, "{%- else %}");
44024400
tl(2, "{{ htm", i18nPage.getString(I18n.var_Bouton), "_", classeApiOperationIdMethode, "() }}");
44034401
tl(1, "{%- endif %}");
4404-
if(activerRoleAdmin) {
4405-
tl(0, "{%- endif %}");
4406-
}
4402+
tl(0, "{%- endif %}");
44074403
} else if(classeApiMethode.equals("DELETE") || classeApiMethode.equals(i18nPage.getString(I18n.var_DELETEFiltre))) {
4408-
if(activerRoleAdmin) {
4409-
tl(0, "{% if ", i18nPage.getString(I18n.var_AUTH_PORTEE_ADMIN), " in ", i18nGlobale.getString(I18n.var_portees), " %}");
4410-
}
4404+
tl(0, "{%- if 'DELETE' in ", i18nGlobale.getString(I18n.var_portees), " %}");
44114405
if(classeApiMethode.equals(i18nPage.getString(I18n.var_DELETEFiltre))) {
44124406
tl(1, "{%- if ", varResultat, "Count > 1 %}");
44134407
} else {
44144408
tl(1, "{%- if ", varResultat, "Count == 1 %}");
44154409
}
44164410
tl(2, "{{ htm", i18nPage.getString(I18n.var_Bouton), "_", classeApiOperationIdMethode, "() }}");
44174411
tl(1, "{%- endif %}");
4418-
if(activerRoleAdmin) {
4419-
tl(0, "{%- endif %}");
4420-
}
4412+
tl(0, "{%- endif %}");
44214413
} else if(classeApiMethode.equals("PATCH")) {
4422-
tl(0, "{%- if ", i18nPage.getString(I18n.var_AUTH_PORTEE_SUPER_ADMIN), " in ", i18nGlobale.getString(I18n.var_portees), " %}");
4414+
tl(0, "{%- if 'PATCH' in ", i18nGlobale.getString(I18n.var_portees), " %}");
44234415
tl(1, "{%- if ", varResultat, "Count > 0 %}");
44244416
tl(2, "{{ htm", i18nPage.getString(I18n.var_Bouton), "_", classeApiOperationIdMethode, "() }}");
44254417
tl(1, "{%- endif %}");
@@ -4429,7 +4421,9 @@ else if(classeApiMethode.contains(i18nPage.getString(I18n.var_PUTCopie)))
44294421
tl(1, "{{ htm", i18nPage.getString(I18n.var_Bouton), "_", classeApiOperationIdMethode, "() }}");
44304422
tl(0, "{%- endif %}");
44314423
} else if(classeApiMethode.equals(i18nPage.getString(I18n.var_PUTCopie))) {
4424+
tl(0, "{%- if ", i18nPage.getString(I18n.var_AUTH_PORTEE_SUPER_ADMIN), " in ", i18nGlobale.getString(I18n.var_portees), " %}");
44324425
tl(0, "{{ htm", i18nPage.getString(I18n.var_Bouton), "_", classeApiOperationIdMethode, "() }}");
4426+
tl(0, "{%- endif %}");
44334427
}
44344428
}
44354429
l();

0 commit comments

Comments
 (0)