You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mb...@apache.org on 2020/03/13 16:36:43 UTC
[ofbiz-framework] branch trunk updated: Implemented: Remove the
user login security question.
This is an automated email from the ASF dual-hosted git repository.
mbrohl pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new bb698b9 Implemented: Remove the user login security question.
bb698b9 is described below
commit bb698b9b96c92e6d541b16850fa9bd3fe99b4142
Author: Michael Brohl <mb...@apache.org>
AuthorDate: Fri Mar 13 17:31:49 2020 +0100
Implemented: Remove the user login security question.
(OFBIZ-11244)
Thanks Wiebke Pätzold for providing the patch.
---
applications/party/minilang/user/UserEvents.xml | 7 -----
applications/party/widget/partymgr/PartyForms.xml | 9 ------
.../ofbiz/securityext/login/LoginEvents.java | 26 ------------------
framework/common/config/SecurityUiLabels.xml | 12 --------
framework/common/config/SecurityextUiLabels.xml | 16 -----------
framework/common/data/CommonTypeData.xml | 1 -
framework/common/servicedef/services.xml | 2 --
framework/common/servicedef/services_security.xml | 16 -----------
.../apache/ofbiz/common/login/LoginServices.java | 19 -------------
framework/common/widget/CommonScreens.xml | 7 -----
framework/common/widget/SecurityForms.xml | 14 ----------
framework/security/data/SecurityTypeDemoData.xml | 31 ---------------------
framework/security/entitydef/entitymodel.xml | 13 ---------
themes/common-theme/template/ChangePassword.ftl | 15 ----------
themes/common-theme/template/ForgotPassword.ftl | 28 ++-----------------
.../common-theme/template/GetSecurityQuestion.ftl | 31 ++++-----------------
themes/common-theme/widget/CommonScreens.xml | 8 ------
themes/rainbowstone/template/ChangePassword.ftl | 13 ---------
themes/rainbowstone/template/ForgotPassword.ftl | 28 ++-----------------
.../rainbowstone/template/GetSecurityQuestion.ftl | 32 ++++------------------
20 files changed, 17 insertions(+), 311 deletions(-)
diff --git a/applications/party/minilang/user/UserEvents.xml b/applications/party/minilang/user/UserEvents.xml
index 4afc8d2..6a3fa50 100644
--- a/applications/party/minilang/user/UserEvents.xml
+++ b/applications/party/minilang/user/UserEvents.xml
@@ -424,13 +424,6 @@ under the License.
<set field="createProductStoreRoleMap.productStoreId" from-field="parameters.PRODUCT_STORE_ID"/>
<call-service service-name="createProductStoreRole" in-map-name="createProductStoreRoleMap"/>
- <if-not-empty field="parameters.securityAnswer">
- <set field="createULSQContext.userLoginId" from-field="parameters.USERNAME"/>
- <set field="createULSQContext.questionEnumId" from-field="parameters.securityQuestion"/>
- <set field="createULSQContext.securityAnswer" from-field="parameters.securityAnswer"/>
- <call-service service-name="createUserLoginSecurityQuestion" in-map-name="createULSQContext" />
- </if-not-empty>
-
<!--send New User Email Notification-->
<set field="emailContext.partyId" from-field="partyId"/>
<set field="emailContext.productStoreId" from-field="parameters.PRODUCT_STORE_ID"/>
diff --git a/applications/party/widget/partymgr/PartyForms.xml b/applications/party/widget/partymgr/PartyForms.xml
index 38417d7..343e419 100644
--- a/applications/party/widget/partymgr/PartyForms.xml
+++ b/applications/party/widget/partymgr/PartyForms.xml
@@ -656,15 +656,6 @@ under the License.
<field use-when="displayPassword!='Y'" name="USERNAME" title="${uiLabelMap.CommonUsername}" tooltip="* ${uiLabelMap.PartyTemporaryPassword}" required-field="true"><text size="30" maxlength="250"/></field>
<!--<field name="RequiredNote" title=" "><display description="${uiLabelMap.PartyRequiredNote}" also-hidden="false"/></field> -->
- <field name="securityQuestion">
- <drop-down allow-empty="true">
- <entity-options entity-name="Enumeration" key-field-name="enumId" description="${description}">
- <entity-constraint name="enumTypeId" operator="equals" value="SQ_STANDARD" />
- </entity-options>
- </drop-down>
- </field>
- <field name="securityAnswer" title="${uiLabelMap.SecurityAnswer}"><text /></field>
-
<field name="PRODUCT_STORE_ID" title="Product Store" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
<drop-down>
<entity-options entity-name="ProductStore" key-field-name="productStoreId" description="${storeName} (${productStoreId})">
diff --git a/applications/securityext/src/main/java/org/apache/ofbiz/securityext/login/LoginEvents.java b/applications/securityext/src/main/java/org/apache/ofbiz/securityext/login/LoginEvents.java
index 69d8b50..ecc8e4a 100644
--- a/applications/securityext/src/main/java/org/apache/ofbiz/securityext/login/LoginEvents.java
+++ b/applications/securityext/src/main/java/org/apache/ofbiz/securityext/login/LoginEvents.java
@@ -142,32 +142,6 @@ public class LoginEvents {
return "error";
}
- String questionEnumId = request.getParameter("securityQuestion");
- String securityAnswer = request.getParameter("securityAnswer");
- if (UtilValidate.isEmpty(questionEnumId) && UtilValidate.isEmpty(securityAnswer)) {
- return "success";
- }
-
- try {
- GenericValue userLoginSecurityQuestion = EntityQuery.use(delegator).from("UserLoginSecurityQuestion").where("questionEnumId", questionEnumId, "userLoginId", userLoginId).cache().queryOne();
- if (userLoginSecurityQuestion != null) {
- if (UtilValidate.isEmpty(securityAnswer)) {
- errMsg = UtilProperties.getMessage(resource, "loginservices.security_answer_empty", UtilHttp.getLocale(request));
- request.setAttribute("_ERROR_MESSAGE_", errMsg);
- return "error";
- }
- String ulSecurityAnswer = userLoginSecurityQuestion.getString("securityAnswer");
- if (UtilValidate.isNotEmpty(ulSecurityAnswer) && ! securityAnswer.equalsIgnoreCase(ulSecurityAnswer)) {
- errMsg = UtilProperties.getMessage(resource, "loginservices.security_answer_not_match", UtilHttp.getLocale(request));
- request.setAttribute("_ERROR_MESSAGE_", errMsg);
- return "error";
- }
- }
- } catch (GenericEntityException e) {
- errMsg = UtilProperties.getMessage(resource, "loginevents.problem_getting_security_question_record", UtilHttp.getLocale(request));
- Debug.logError(e, errMsg, module);
- }
-
GenericValue supposedUserLogin = null;
String passwordHint = null;
diff --git a/framework/common/config/SecurityUiLabels.xml b/framework/common/config/SecurityUiLabels.xml
index 3a7a6d8..2fef15b 100644
--- a/framework/common/config/SecurityUiLabels.xml
+++ b/framework/common/config/SecurityUiLabels.xml
@@ -83,10 +83,6 @@
<value xml:lang="zh">把用户登录添加到安全组</value>
<value xml:lang="zh-TW">把使用者登入增加到安全群組</value>
</property>
- <property key="AnswerSecurityQuestion">
- <value xml:lang="en">Answer your Security Question</value>
- <value xml:lang="fr">Répondez à votre question de sécurité</value>
- </property>
<property key="CertComponent">
<value xml:lang="de">Komponente</value>
<value xml:lang="en">Component</value>
@@ -715,10 +711,6 @@
<value xml:lang="en">Click Here To Reset Password</value>
<value xml:lang="fr">Cliquez ici pour créer un nouveau mot de passe</value>
</property>
- <property key="SecurityAnswer">
- <value xml:lang="en">Security Answer</value>
- <value xml:lang="fr">Réponse de sécurité</value>
- </property>
<property key="SecurityGroups">
<value xml:lang="de">Sicherheitsgruppen</value>
<value xml:lang="en">Security Groups</value>
@@ -753,10 +745,6 @@
<value xml:lang="zh">安全组列表</value>
<value xml:lang="zh-TW">安全群組清單</value>
</property>
- <property key="SecurityQuestion">
- <value xml:lang="en">Security Question</value>
- <value xml:lang="fr">Question de sécurité</value>
- </property>
<property key="SecurityViewPermissionError">
<value xml:lang="de">Sicherheitsfehler: Sie haben nicht die Berechtigung diese Seite anzusehen. ("SECURITY_VIEW" oder "SECURITY_ADMIN" benötigt) </value>
<value xml:lang="en">SecurityViewPermissionError You do not have permission to view this page. ("SECURITY_VIEW" or "SECURITY_ADMIN" needed)</value>
diff --git a/framework/common/config/SecurityextUiLabels.xml b/framework/common/config/SecurityextUiLabels.xml
index 8fcde94..5aa7472 100644
--- a/framework/common/config/SecurityextUiLabels.xml
+++ b/framework/common/config/SecurityextUiLabels.xml
@@ -267,10 +267,6 @@
<value xml:lang="zh">密码是空的,请重新输入。</value>
<value xml:lang="zh-TW">密碼是空的, 請重新輸入.</value>
</property>
- <property key="loginevents.problem_getting_security_question_record">
- <value xml:lang="en">Problem getting User Login Security Question record.</value>
- <value xml:lang="fr">Problème durant la lecture de votre question de sécurité</value>
- </property>
<property key="loginevents.problems_with_configuration_contact_customer_service">
<value xml:lang="de">Fehler bei der Konfiguration; bitte wenden Sie sich an den Kundenservice.</value>
<value xml:lang="en">Problems with configuration; please contact customer service.</value>
@@ -551,10 +547,6 @@
<value xml:lang="zh">无法禁用旧的登录用户(写错误):${errorMessage}。</value>
<value xml:lang="zh-TW">無法停用舊有使用者(寫入錯誤): ${errorMessage}.</value>
</property>
- <property key="loginservices.error_setting_security_question">
- <value xml:lang="en">Exception thrown while setting security question for the UserLogin:</value>
- <value xml:lang="fr">Problème durant l'écriture de votre question de sécurité</value>
- </property>
<property key="loginservices.ldap_authentication_failed">
<value xml:lang="de">LDAP Anmeldung nicht möglich</value>
<value xml:lang="en">LDAP authentication failed.</value>
@@ -838,14 +830,6 @@
<value xml:lang="zh">密码提示(${userLoginId})。</value>
<value xml:lang="zh-TW">密碼提示(${userLoginId}).</value>
</property>
- <property key="loginservices.security_answer_empty">
- <value xml:lang="en">The security answer is missing</value>
- <value xml:lang="fr">La question de sécurité manque</value>
- </property>
- <property key="loginservices.security_answer_not_match">
- <value xml:lang="en">The answer does not match records, re-enter</value>
- <value xml:lang="fr">Votre réponse à la question de sécurité ne correspond, essayez à nouveau.</value>
- </property>
<property key="loginservices.since_datetime">
<value xml:lang="de">(seit ${disabledDateTime})</value>
<value xml:lang="en">since ${disabledDateTime}.</value>
diff --git a/framework/common/data/CommonTypeData.xml b/framework/common/data/CommonTypeData.xml
index e14d904..9f82a75 100644
--- a/framework/common/data/CommonTypeData.xml
+++ b/framework/common/data/CommonTypeData.xml
@@ -112,7 +112,6 @@ under the License.
<Enumeration enumId="VT_LOGIN_TMPLT_LOC" description="Login Template Location" enumTypeId="VT_RES_TYPE" sequenceId="21"/>
<Enumeration enumId="VT_CHPWD_TMPLT_LOC" description="Change Password Template Location" enumTypeId="VT_RES_TYPE" sequenceId="22"/>
<Enumeration enumId="VT_FGPWD_TMPLT_LOC" description="Forget Password Template Location" enumTypeId="VT_RES_TYPE" sequenceId="23"/>
- <Enumeration enumId="VT_GSQUE_TMPLT_LOC" description="Security Question Template Location" enumTypeId="VT_RES_TYPE" sequenceId="24"/>
<Enumeration enumId="VT_IMPERSO_TMPLT_LOC" description="Impersonated Template Location" enumTypeId="VT_RES_TYPE" sequenceId="25"/>
<Enumeration enumId="VT_STYLESHEET_LESS" description="Style Sheet Less URL" enumTypeId="VT_RES_TYPE" sequenceId="25"/>
diff --git a/framework/common/servicedef/services.xml b/framework/common/servicedef/services.xml
index 87554d5..baac0de 100644
--- a/framework/common/servicedef/services.xml
+++ b/framework/common/servicedef/services.xml
@@ -406,8 +406,6 @@ under the License.
<attribute name="requirePasswordChange" type="String" mode="IN" optional="true"/>
<attribute name="externalAuthId" type="String" mode="IN" optional="true"/>
<attribute name="partyId" type="String" mode="IN" optional="true"/>
- <attribute name="securityQuestion" type="String" mode="IN" optional="true"/>
- <attribute name="securityAnswer" type="String" mode="IN" optional="true"/>
</service>
<service name="updateUserLoginId" engine="java" location="org.apache.ofbiz.common.login.LoginServices" invoke="updateUserLoginId" auth="true">
<description>Update a UserLoginId by creating a new one and expiring the old one</description>
diff --git a/framework/common/servicedef/services_security.xml b/framework/common/servicedef/services_security.xml
index 4ef8768..0df3262 100644
--- a/framework/common/servicedef/services_security.xml
+++ b/framework/common/servicedef/services_security.xml
@@ -144,22 +144,6 @@ under the License.
<implements service="permissionInterface"/>
<attribute name="primaryPermission" type="String" mode="IN" optional="true" default-value="SECURITY"/>
</service>
-
- <service name="createUserLoginSecurityQuestion" engine="entity-auto" invoke="create" default-entity-name="UserLoginSecurityQuestion" auth="true">
- <description>Create a UserLoginSecurityQuestion</description>
- <auto-attributes include="pk" mode="IN" optional="false"/>
- <auto-attributes include="nonpk" mode="IN" optional="true"/>
- </service>
- <service name="updateUserLoginSecurityQuestion" engine="entity-auto" invoke="update" default-entity-name="UserLoginSecurityQuestion" auth="true">
- <description>Update a UserLoginSecurityQuestion</description>
- <auto-attributes include="pk" mode="IN" optional="false"/>
- <auto-attributes include="nonpk" mode="IN" optional="true"/>
- </service>
- <service name="removeUserLoginSecurityQuestion" engine="entity-auto" invoke="delete" default-entity-name="UserLoginSecurityQuestion" auth="true">
- <description>Remove UserLoginSecurityQuestion</description>
- <auto-attributes include="pk" mode="IN" optional="false"/>
- <auto-attributes include="nonpk" mode="IN" optional="true"/>
- </service>
<service name="deleteSecurityGroup" default-entity-name="SecurityGroup" engine="entity-auto" invoke="delete" auth="true">
<description>Delete a SecurityGroup</description>
diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java b/framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
index 19bd37b..e17845a 100644
--- a/framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
@@ -57,7 +57,6 @@ import org.apache.ofbiz.entity.util.EntityUtilProperties;
import org.apache.ofbiz.security.Security;
import org.apache.ofbiz.security.SecurityUtil;
import org.apache.ofbiz.service.DispatchContext;
-import org.apache.ofbiz.service.GenericServiceException;
import org.apache.ofbiz.service.LocalDispatcher;
import org.apache.ofbiz.service.ModelService;
import org.apache.ofbiz.service.ServiceUtil;
@@ -621,7 +620,6 @@ public class LoginServices {
public static Map<String, Object> createUserLogin(DispatchContext ctx, Map<String, ?> context) {
Map<String, Object> result = new LinkedHashMap<>();
Delegator delegator = ctx.getDelegator();
- LocalDispatcher dispatcher = ctx.getDispatcher();
Security security = ctx.getSecurity();
GenericValue loggedInUserLogin = (GenericValue) context.get("userLogin");
List<String> errorMessageList = new LinkedList<>();
@@ -639,9 +637,6 @@ public class LoginServices {
String externalAuthId = (String) context.get("externalAuthId");
String errMsg = null;
- String questionEnumId = (String) context.get("securityQuestion");
- String securityAnswer = (String) context.get("securityAnswer");
-
// security: don't create a user login if the specified partyId (if not empty) already exists
// unless the logged in user has permission to do so (same partyId or PARTYMGR_CREATE)
if (UtilValidate.isNotEmpty(partyId)) {
@@ -712,20 +707,6 @@ public class LoginServices {
return ServiceUtil.returnError(errMsg);
}
- try {
- if (UtilValidate.isNotEmpty(securityAnswer)) {
- Map<String, Object> resultMap = dispatcher.runSync("createUserLoginSecurityQuestion",
- UtilMisc.toMap("userLogin", loggedInUserLogin, "userLoginId", userLoginId, "questionEnumId", questionEnumId, "securityAnswer", securityAnswer));
- if (ServiceUtil.isError(resultMap)) {
- errMsg = ServiceUtil.getErrorMessage(resultMap);
- errorMessageList.add(errMsg);
- Debug.logError(errMsg, module);
- }
- }
- } catch (GenericServiceException e1) {
- errMsg = UtilProperties.getMessage(resource,"loginservices.error_setting_security_question", locale);
- Debug.logError(e1, errMsg, module);
- }
result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS);
return result;
}
diff --git a/framework/common/widget/CommonScreens.xml b/framework/common/widget/CommonScreens.xml
index b156def..d794276 100644
--- a/framework/common/widget/CommonScreens.xml
+++ b/framework/common/widget/CommonScreens.xml
@@ -256,13 +256,6 @@ under the License.
<section>
<actions>
<set field="userLoginId" from-field="parameters.USERNAME"/>
- <entity-and entity-name="UserLoginSecurityQuestion" list="securityQuestions">
- <field-map field-name="userLoginId" />
- </entity-and>
- <set field="questionEnumId" from-field="securityQuestions[0].questionEnumId" />
- <entity-one entity-name="Enumeration" value-field="securityQuestion">
- <field-map field-name="enumId" from-field="questionEnumId" />
- </entity-one>
</actions>
<widgets>
<include-screen name="MinimalActions" />
diff --git a/framework/common/widget/SecurityForms.xml b/framework/common/widget/SecurityForms.xml
index cebc997..87dab35 100644
--- a/framework/common/widget/SecurityForms.xml
+++ b/framework/common/widget/SecurityForms.xml
@@ -79,20 +79,6 @@ under the License.
<option key="N" description="${uiLabelMap.CommonN}"/>
</drop-down>
</field>
- <field name="securityQuestion">
- <drop-down allow-empty="true">
- <entity-options entity-name="Enumeration" key-field-name="enumId" description="${description}">
- <entity-constraint name="enumTypeId" operator="equals" value="SQ_STANDARD" />
- </entity-options>
- </drop-down>
- </field>
- <field name="securityAnswer" title="${uiLabelMap.SecurityAnswer}"><text /></field>
- <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="text-link"/></field>
- <field name="cancelLink" title=" " widget-style="smallSubmit">
- <hyperlink description="${uiLabelMap.CommonCancelDone}" target="${cancelPage}" also-hidden="false">
- <parameter param-name="partyId"/>
- </hyperlink>
- </field>
</form>
<form name="AddUserLoginSecurityGroup" type="single" target="${addUserLoginSecurityGroupURI}"
diff --git a/framework/security/data/SecurityTypeDemoData.xml b/framework/security/data/SecurityTypeDemoData.xml
deleted file mode 100644
index 1efdc6f..0000000
--- a/framework/security/data/SecurityTypeDemoData.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<entity-engine-xml>
- <!-- OFBiz Core security -->
-
- <EnumerationType enumTypeId="SECURITY_QUESTION" description="Security Question"/>
- <EnumerationType enumTypeId="SQ_CUSTOM" parentTypeId="SECURITY_QUESTION" description="Custom Security Question"/>
- <EnumerationType enumTypeId="SQ_STANDARD" parentTypeId="SECURITY_QUESTION" description="Standard Security Question"/>
- <Enumeration enumId="SQ_STD_NCKNM" enumTypeId="SQ_STANDARD" sequenceId="0" description="What is your nick name"/>
- <Enumeration enumId="SQ_STD_MOTNM" enumTypeId="SQ_STANDARD" sequenceId="1" description="What is your mother's maiden name"/>
- <Enumeration enumId="SQ_STD_FAVTCH" enumTypeId="SQ_STANDARD" sequenceId="2" description="What is your favorite teacher's name"/>
- <Enumeration enumId="SQ_STD_PETNM" enumTypeId="SQ_STANDARD" sequenceId="2" description="What is your pet's name"/>
- <Enumeration enumId="SQ_STD_BSTFRND" enumTypeId="SQ_STANDARD" sequenceId="3" description="Who is your best childhood friend"/>
-</entity-engine-xml>
diff --git a/framework/security/entitydef/entitymodel.xml b/framework/security/entitydef/entitymodel.xml
index d179569..a1de8a7 100644
--- a/framework/security/entitydef/entitymodel.xml
+++ b/framework/security/entitydef/entitymodel.xml
@@ -259,17 +259,4 @@ under the License.
<prim-key field="viewNameId"/>
<prim-key field="userLoginId"/>
</entity>
- <entity entity-name="UserLoginSecurityQuestion" package-name="org.apache.ofbiz.security.login">
- <field name="questionEnumId" type="id" />
- <field name="userLoginId" type="id-vlong" />
- <field name="securityAnswer" type="description" />
- <prim-key field="questionEnumId"/>
- <prim-key field="userLoginId"/>
- <relation rel-entity-name="Enumeration" type="one" fk-name="SECQ_ENUM">
- <key-map field-name="questionEnumId" rel-field-name="enumId"/>
- </relation>
- <relation rel-entity-name="UserLogin" type="one" fk-name="ULGNSECQ_ULGN">
- <key-map field-name="userLoginId"/>
- </relation>
- </entity>
</entitymodel>
diff --git a/themes/common-theme/template/ChangePassword.ftl b/themes/common-theme/template/ChangePassword.ftl
index b0b76e0..9c6ad36 100644
--- a/themes/common-theme/template/ChangePassword.ftl
+++ b/themes/common-theme/template/ChangePassword.ftl
@@ -57,21 +57,6 @@ under the License.
<td class="label">${uiLabelMap.CommonNewPasswordVerify}</td>
<td><input type="password" name="newPasswordVerify" autocomplete="off" value="" size="20"/></td>
</tr>
- <#if securityQuestion?has_content>
- <tr>
- <td class="label">${uiLabelMap.SecurityQuestiom}</td>
- <td>
- <input type="hidden" name="securityQuestion" value="${securityQuestion.enumId!}" />
- ${securityQuestion.description!}
- </td>
- </tr>
- <tr>
- <td class="label">${uiLabelMap.SecurityAnswer}</td>
- <td>
- <input type="text" class='inputBox' name="securityAnswer" id="SECURITY_ANSWER" value="" maxlength="100" />
- </td>
- </tr>
- </#if>
<tr>
<td colspan="2" align="center">
<input type="submit" value="${uiLabelMap.CommonSubmit}"/>
diff --git a/themes/common-theme/template/ForgotPassword.ftl b/themes/common-theme/template/ForgotPassword.ftl
index 3e936e4..44c5e63 100644
--- a/themes/common-theme/template/ForgotPassword.ftl
+++ b/themes/common-theme/template/ForgotPassword.ftl
@@ -16,11 +16,8 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<#if securityQuestion??>
- <#assign messageTitle = uiLabelMap.AnswerSecurityQuestion>
-<#else>
- <#assign messageTitle = uiLabelMap.CommonForgotYourPassword>
-</#if>
+
+<#assign messageTitle = uiLabelMap.CommonForgotYourPassword>
<#if ! userLoginId??>
<#assign userLoginId = requestParameters.USERNAME!>
<#if ! userLoginId?? && autoUserLogin??>
@@ -39,26 +36,7 @@ under the License.
<td class="label">${uiLabelMap.CommonUsername}</td>
<td><input type="text" size="20" name="USERNAME" value="${userLoginId!}"/></td>
</tr>
- <#if securityQuestion?has_content>
- <tr>
- <td class="label">${uiLabelMap.SecurityQuestion}</td>
- <td>
- ${securityQuestion.description!}
- <input type="hidden" name="securityQuestion" value="${securityQuestion.enumId!}" />
- </td>
- </tr>
- <tr>
- <td class="label">${uiLabelMap.SecurityAnswer}</td>
- <td>
- <input type="text" name="securityAnswer" class="" value="" />
- </td>
- </tr>
- <tr>
- <td colspan="2" align="center">
- <input type="submit" name="GET_PASSWORD_HINT" class="smallSubmit" value="${uiLabelMap.CommonGetPasswordHint}"/>
- </td>
- </tr>
- <#elseif requestParameters.token??>
+ <#if requestParameters.token??>
<input type="hidden" name="token" value="${requestParameters.token}"/>
<tr>
<td class="label">${uiLabelMap.CommonNewPassword}</td>
diff --git a/themes/common-theme/template/GetSecurityQuestion.ftl b/themes/common-theme/template/GetSecurityQuestion.ftl
index 68d9295..aa1d3aa 100644
--- a/themes/common-theme/template/GetSecurityQuestion.ftl
+++ b/themes/common-theme/template/GetSecurityQuestion.ftl
@@ -20,37 +20,16 @@ under the License.
<center>
<div class="screenlet login-screenlet">
<div class="screenlet-title-bar">
- <#if securityQuestion?has_content>
- <h3>${uiLabelMap.AnswerSecurityQuestion}</h3>
- <#else>
- <h3>${uiLabelMap.CommonForgotYourPassword}</h3>
- </#if>
+ <h3>${uiLabelMap.CommonForgotYourPassword}</h3>
</div>
<div class="screenlet-body">
<form method="post" action="<@o...@ofbizUrl>" name="forgotpassword">
<table class="basic-table" cellspacing="0">
<#if userLoginId?has_content>
- <#if securityQuestion?has_content>
- <tr>
- <td class="label">${uiLabelMap.SecurityQuestion}</td>
- <td>
- ${securityQuestion.description!}
- <input type="hidden" name="securityQuestion" value="${securityQuestion.enumId!}" />
- <input type="hidden" name="USERNAME" value="${userLoginId!}" />
- </td>
- </tr>
- <tr>
- <td class="label">${uiLabelMap.SecurityAnswer}</td>
- <td>
- <input type="text" name="securityAnswer" class="" value="" />
- </td>
- </tr>
- <#else>
- <tr>
- <td class="label">${uiLabelMap.CommonUsername}</td>
- <td><input type="text" size="20" name="USERNAME" value="<#if requestParameters.USERNAME?has_content>${requestParameters.USERNAME}<#elseif autoUserLogin?has_content>${autoUserLogin.userLoginId}</#if>" /></td>
- </tr>
- </#if>
+ <tr>
+ <td class="label">${uiLabelMap.CommonUsername}</td>
+ <td><input type="text" size="20" name="USERNAME" value="<#if requestParameters.USERNAME?has_content>${requestParameters.USERNAME}<#elseif autoUserLogin?has_content>${autoUserLogin.userLoginId}</#if>" /></td>
+ </tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="GET_PASSWORD_HINT" class="smallSubmit" value="${uiLabelMap.CommonGetPasswordHint}" />
diff --git a/themes/common-theme/widget/CommonScreens.xml b/themes/common-theme/widget/CommonScreens.xml
index 9993deb..7b281f0 100644
--- a/themes/common-theme/widget/CommonScreens.xml
+++ b/themes/common-theme/widget/CommonScreens.xml
@@ -642,14 +642,6 @@ under the License.
</condition>
<actions>
<set field="userLoginId" from-field="parameters.USERNAME"/>
- <entity-and entity-name="UserLoginSecurityQuestion" list="securityQuestions">
- <field-map field-name="userLoginId" />
- </entity-and>
- <set field="questionEnumId" from-field="securityQuestions[0].questionEnumId" />
- <entity-one entity-name="Enumeration" value-field="securityQuestion">
- <field-map field-name="enumId" from-field="questionEnumId"/>
- </entity-one>
- <set field="securityQuestion" from-field="securityQuestion"/>
</actions>
</section>
<platform-specific>
diff --git a/themes/rainbowstone/template/ChangePassword.ftl b/themes/rainbowstone/template/ChangePassword.ftl
index 3fdb8ee..d6e920c 100644
--- a/themes/rainbowstone/template/ChangePassword.ftl
+++ b/themes/rainbowstone/template/ChangePassword.ftl
@@ -57,19 +57,6 @@ under the License.
<td class="label">${uiLabelMap.CommonNewPasswordVerify}</td>
<td><input type="password" name="newPasswordVerify" autocomplete="off" value="" size="20"/></td>
</tr>
- <#if securityQuestion?has_content>
- <tr>
- <td class="label">${uiLabelMap.SecurityQuestiom}</td>
- <td>
- <input type="hidden" name="securityQuestion" value="${securityQuestion.enumId!}" />
- ${securityQuestion.description!}
- </td>
- </tr>
- <tr>
- <td class="label">${uiLabelMap.SecurityAnswer}</td>
- <td><input type="text" class='inputBox' name="securityAnswer" id="SECURITY_ANSWER" value="" maxlength="100" /></td>
- </tr>
- </#if>
<tr>
<td colspan="2" align="center">
<input type="submit" value="${uiLabelMap.CommonSubmit}"/>
diff --git a/themes/rainbowstone/template/ForgotPassword.ftl b/themes/rainbowstone/template/ForgotPassword.ftl
index a2ef71f..ef98e39 100644
--- a/themes/rainbowstone/template/ForgotPassword.ftl
+++ b/themes/rainbowstone/template/ForgotPassword.ftl
@@ -16,11 +16,8 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<#if securityQuestion??>
- <#assign messageTitle = uiLabelMap.AnswerSecurityQuestion>
-<#else>
- <#assign messageTitle = uiLabelMap.CommonForgotYourPassword>
-</#if>
+
+<#assign messageTitle = uiLabelMap.CommonForgotYourPassword>
<#if ! userLoginId??>
<#assign userLoginId = requestParameters.USERNAME!>
<#if ! userLoginId?? && autoUserLogin??>
@@ -40,26 +37,7 @@ under the License.
<td class="label">${uiLabelMap.CommonUsername}</td>
<td><input type="text" size="20" name="USERNAME" value="${userLoginId!}"/></td>
</tr>
- <#if securityQuestion?has_content>
- <tr>
- <td class="label">${uiLabelMap.SecurityQuestion}</td>
- <td>
- ${securityQuestion.description!}
- <input type="hidden" name="securityQuestion" value="${securityQuestion.enumId!}" />
- </td>
- </tr>
- <tr>
- <td class="label">${uiLabelMap.SecurityAnswer}</td>
- <td>
- <input type="text" name="securityAnswer" class="" value="" />
- </td>
- </tr>
- <tr>
- <td colspan="2" align="center">
- <input type="submit" name="GET_PASSWORD_HINT" class="smallSubmit" value="${uiLabelMap.CommonGetPasswordHint}"/>
- </td>
- </tr>
- <#elseif requestParameters.token??>
+ <#if requestParameters.token??>
<input type="hidden" name="token" value="${requestParameters.token}"/>
<tr>
<td class="label">${uiLabelMap.CommonNewPassword}</td>
diff --git a/themes/rainbowstone/template/GetSecurityQuestion.ftl b/themes/rainbowstone/template/GetSecurityQuestion.ftl
index 46b87d1..f6e6918 100644
--- a/themes/rainbowstone/template/GetSecurityQuestion.ftl
+++ b/themes/rainbowstone/template/GetSecurityQuestion.ftl
@@ -16,11 +16,8 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<#if securityQuestion?has_content>
- <#assign messageTitle = uiLabelMap.AnswerSecurityQuestion>
-<#else>
- <#assign messageTitle = uiLabelMap.CommonForgotYourPassword>
-</#if>
+
+<#assign messageTitle = uiLabelMap.CommonForgotYourPassword>
<div id="loginBar"><span>${messageTitle}</span><div id="company-logo"></div></div>
<center>
<div class="screenlet login-screenlet">
@@ -31,27 +28,10 @@ under the License.
<form method="post" action="<@o...@ofbizUrl>" name="forgotpassword">
<table class="basic-table" cellspacing="0">
<#if userLoginId?has_content>
- <#if securityQuestion?has_content>
- <tr>
- <td class="label">${uiLabelMap.SecurityQuestion}</td>
- <td>
- ${securityQuestion.description!}
- <input type="hidden" name="securityQuestion" value="${securityQuestion.enumId!}" />
- <input type="hidden" name="USERNAME" value="${userLoginId!}" />
- </td>
- </tr>
- <tr>
- <td class="label">${uiLabelMap.SecurityAnswer}</td>
- <td>
- <input type="text" name="securityAnswer" class="" value="" />
- </td>
- </tr>
- <#else>
- <tr>
- <td class="label">${uiLabelMap.CommonUsername}</td>
- <td><input type="text" size="20" name="USERNAME" value="<#if requestParameters.USERNAME?has_content>${requestParameters.USERNAME}<#elseif autoUserLogin?has_content>${autoUserLogin.userLoginId}</#if>" /></td>
- </tr>
- </#if>
+ <tr>
+ <td class="label">${uiLabelMap.CommonUsername}</td>
+ <td><input type="text" size="20" name="USERNAME" value="<#if requestParameters.USERNAME?has_content>${requestParameters.USERNAME}<#elseif autoUserLogin?has_content>${autoUserLogin.userLoginId}</#if>" /></td>
+ </tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="GET_PASSWORD_HINT" class="smallSubmit" value="${uiLabelMap.CommonGetPasswordHint}" />