Skip to content

Commit

Permalink
Lut 26831 : simplify get response from backup
Browse files Browse the repository at this point in the history
  • Loading branch information
TimotheeHrl committed Dec 11, 2023
1 parent da491f0 commit cff39f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ public final class FormsConstants
public static final String SEPARATOR_UNDERSCORE = "_";
public static final String SEPARATOR_SEMICOLON = ";";
public static final String END_OF_LINE = "\n";
public static final String FO_LOGIN_PAGE_PARAMETERS = "forms.frontOffice.loginPage.parameters";



/**
Expand Down
3 changes: 2 additions & 1 deletion src/java/fr/paris/lutece/plugins/forms/web/FormXPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public class FormXPage extends MVCApplication
private static final String MARK_FORM_LIST = "form_list";
private static final String MARK_DISPLAY_CAPTCHA = "display_captcha";
private static final String MARK_CAPTCHA = "captcha";
private static final String AUTH_PROVIDER = "auth_provider";
// Other
private static FormService _formService = SpringContextService.getBean( FormService.BEAN_NAME );
private ICaptchaSecurityService _captchaSecurityService = new CaptchaSecurityService( );
Expand Down Expand Up @@ -1238,6 +1237,8 @@ public synchronized XPage doSynchronousUploadDocument( HttpServletRequest reques
private void isRequestFromALoginPage (HttpServletRequest request)
{
String urlFromRequestReferer = request.getHeader("referer");
// get property from forms.frontoffice.loginPage.parameters
String AUTH_PROVIDER = AppPropertiesService.getProperty(FormsConstants.FO_LOGIN_PAGE_PARAMETERS);
if (urlFromRequestReferer != null && urlFromRequestReferer.contains(AUTH_PROVIDER))
{
isRequestFromLoginPage = true;
Expand Down
2 changes: 2 additions & 0 deletions webapp/WEB-INF/conf/plugins/forms.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ forms.publicdashboard.question.isPublished=true

# Export field list
forms.entryTypeGeolocation.export.fields=address

forms.frontOffice.loginPage.parameters=page=mylutece&action=login&auth_provider=mylutece-database

0 comments on commit cff39f0

Please sign in to comment.