Skip to content

Commit cff39f0

Browse files
committed
Lut 26831 : simplify get response from backup
1 parent da491f0 commit cff39f0

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/java/fr/paris/lutece/plugins/forms/util/FormsConstants.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ public final class FormsConstants
251251
public static final String SEPARATOR_UNDERSCORE = "_";
252252
public static final String SEPARATOR_SEMICOLON = ";";
253253
public static final String END_OF_LINE = "\n";
254+
public static final String FO_LOGIN_PAGE_PARAMETERS = "forms.frontOffice.loginPage.parameters";
255+
254256

255257

256258
/**

src/java/fr/paris/lutece/plugins/forms/web/FormXPage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ public class FormXPage extends MVCApplication
139139
private static final String MARK_FORM_LIST = "form_list";
140140
private static final String MARK_DISPLAY_CAPTCHA = "display_captcha";
141141
private static final String MARK_CAPTCHA = "captcha";
142-
private static final String AUTH_PROVIDER = "auth_provider";
143142
// Other
144143
private static FormService _formService = SpringContextService.getBean( FormService.BEAN_NAME );
145144
private ICaptchaSecurityService _captchaSecurityService = new CaptchaSecurityService( );
@@ -1238,6 +1237,8 @@ public synchronized XPage doSynchronousUploadDocument( HttpServletRequest reques
12381237
private void isRequestFromALoginPage (HttpServletRequest request)
12391238
{
12401239
String urlFromRequestReferer = request.getHeader("referer");
1240+
// get property from forms.frontoffice.loginPage.parameters
1241+
String AUTH_PROVIDER = AppPropertiesService.getProperty(FormsConstants.FO_LOGIN_PAGE_PARAMETERS);
12411242
if (urlFromRequestReferer != null && urlFromRequestReferer.contains(AUTH_PROVIDER))
12421243
{
12431244
isRequestFromLoginPage = true;

webapp/WEB-INF/conf/plugins/forms.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ forms.publicdashboard.question.isPublished=true
3737

3838
# Export field list
3939
forms.entryTypeGeolocation.export.fields=address
40+
41+
forms.frontOffice.loginPage.parameters=page=mylutece&action=login&auth_provider=mylutece-database

0 commit comments

Comments
 (0)