IDEMPIERE-375 Implement Forgot my Password
This commit is contained in:
parent
bf5e689eef
commit
6c787d4654
|
@ -0,0 +1,354 @@
|
|||
-- Sep 10, 2012 5:10:21 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsExpired',200126,'D','Expired','Expired','875fbbb0-2513-4a00-9f74-001bceab1f24',0,TO_DATE('2012-09-10 17:10:19','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-09-10 17:10:19','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:10:22 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200126 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:10:40 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,114,200456,'U','Y','N','N',0,'N',1,'N',20,'N','N',200126,'N','Y','a5c7128b-3935-41c0-aa78-8541972a7171','N','Y','N','IsExpired','N','Expired','Y',100,TO_DATE('2012-09-10 17:10:39','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-09-10 17:10:39','YYYY-MM-DD HH24:MI:SS'),100,0,0)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:10:40 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200456 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:10:45 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-09-10 17:10:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200456
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:12:01 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
ALTER TABLE AD_User ADD IsExpired CHAR(1) DEFAULT 'N' CHECK (IsExpired IN ('Y','N')) NOT NULL
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:12:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('SecurityQuestion',200127,'D','Security Question','Security Question','11eefd52-bc27-4768-a8ca-71e4c481fd53',0,TO_DATE('2012-09-10 17:12:29','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-09-10 17:12:29','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:12:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200127 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:35 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,114,200457,'D','N','N','N',0,'N',255,'N',10,'N','N',200127,'N','Y','b92718ad-ac9d-40d7-929a-a1b34d9982fa','N','Y','N','SecurityQuestion','Security Question','Y',100,TO_DATE('2012-09-10 17:14:34','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-09-10 17:14:34','YYYY-MM-DD HH24:MI:SS'),100,0,0)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:35 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200457 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:43 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
ALTER TABLE AD_User ADD SecurityQuestion NVARCHAR2(255) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:58 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('Answer',200128,'D','Answer','Answer','3d07421f-1ebf-49b1-9b0e-d7d4bbb0cc39',0,TO_DATE('2012-09-10 17:14:57','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-09-10 17:14:57','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:58 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200128 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:16:45 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,114,200458,'U','N','N','N',0,'N',1024,'N',10,'N','N',200128,'N','Y','cc25c82a-78b7-4831-81a2-4eae10c6b839','N','Y','N','Answer','Answer','Y',100,TO_DATE('2012-09-10 17:16:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-09-10 17:16:45','YYYY-MM-DD HH24:MI:SS'),100,0,0)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:16:45 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200458 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:16:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-09-10 17:16:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200458
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:18:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
ALTER TABLE AD_User ADD Answer NVARCHAR2(1024) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:19:50 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Reset Password',200044,'D','183be9be-6e0a-4cdc-82fd-c91efabfd586','ResetPassword','Y',TO_DATE('2012-09-10 17:19:49','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 17:19:49','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:19:51 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200044 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:20:14 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Security Question',200045,'D','74df2198-589e-4e80-93c3-6b300c5705b5','SecurityQuestion','Y',TO_DATE('2012-09-10 17:20:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 17:20:13','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:20:14 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200045 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:20:40 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Answer',200046,'D','494db2ce-7749-4f52-82a1-d7e9448ab864','Answer','Y',TO_DATE('2012-09-10 17:20:40','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 17:20:40','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:20:46 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Answer',200047,'D','397a2656-2199-4451-87fe-5850b54957c0','Answer','Y',TO_DATE('2012-09-10 17:20:45','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 17:20:45','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:21:23 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Security Question is Mandatory',200048,'D','5c73ed0f-6ca9-45bc-8df7-e85f8bc3471d','SecurityQuestionMandatory','Y',TO_DATE('2012-09-10 17:21:22','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 17:21:22','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:21:23 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200048 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:21:43 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Answer is Mandatory',200049,'D','2a9de4c5-671b-4622-a8d4-b0fde148308d','AnswerMandatory','Y',TO_DATE('2012-09-10 17:21:43','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 17:21:43','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:21:43 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200049 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:14 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Invalid Security Question and Answer!',200050,'D','2904015f-ffe7-4179-a76d-5748700ea0ee','InvalidSecurityQuestionAndAnswer','Y',TO_DATE('2012-09-10 17:22:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 17:22:13','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:14 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200050 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:39 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1024,'N','N',200458,'Y',200473,'N','D','Answer','N','Y','2e16932c-92d6-46a0-be21-70164101b156',100,0,TO_DATE('2012-09-10 17:22:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-09-10 17:22:38','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:39 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200473 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:41 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1,'N','N',200456,'Y',200474,'N','D','Expired','N','Y','2b408d81-657b-473b-b425-b97e2d54dd3a',100,0,TO_DATE('2012-09-10 17:22:40','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-09-10 17:22:40','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:41 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200474 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:41 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,255,'N','N',200457,'Y',200475,'N','D','Security Question','N','Y','52bbd8a1-d84e-451d-8b79-63a8db9b9dbe',100,0,TO_DATE('2012-09-10 17:22:41','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-09-10 17:22:41','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:42 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200475 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=200474
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:06 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNoGrid=390,IsDisplayedGrid='Y' WHERE AD_Field_ID=200474
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:06 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNoGrid=400,IsDisplayedGrid='Y' WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:06 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNoGrid=410,IsDisplayedGrid='Y' WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:47 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-09-10 17:23:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200474
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:51 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-09-10 17:23:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:24:16 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET IsEncrypted='Y', IsSameLine='Y', IsReadOnly='Y',Updated=TO_DATE('2012-09-10 17:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:24:20 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET IsEncrypted='Y',Updated=TO_DATE('2012-09-10 17:24:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:24:59 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET DisplayLength=20,Updated=TO_DATE('2012-09-10 17:24:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:25:02 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET DisplayLength=20,Updated=TO_DATE('2012-09-10 17:25:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:18 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','What was your childhood nickname?',200051,'D','5f1d8902-cf42-4ebc-ac9a-40e08ccdd0e7','SecurityQuestion_1','Y',TO_DATE('2012-09-10 18:23:17','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 18:23:17','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:19 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200051 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Who was your childhood hero?',200052,'D','a6c718d8-1c4d-423d-a075-724c61d897bd','SecurityQuestion_2','Y',TO_DATE('2012-09-10 18:23:29','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 18:23:29','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200052 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:42 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','What was the name of your elementary / primary school?',200053,'D','f707f3be-69f3-4c3a-870e-5c366e9b2874','SecurityQuestion_3','Y',TO_DATE('2012-09-10 18:23:41','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 18:23:41','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:42 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200053 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:52 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','What are the last 5 digits of your driver''s license number?',200054,'D','c1e63df5-2df9-4970-ae78-24b75411d166','SecurityQuestion_4','Y',TO_DATE('2012-09-10 18:23:51','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 18:23:51','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:52 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200054 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:24:04 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Where did you meet your spouse / significant other?',200055,'D','0d1ffdfe-7e55-4796-ba95-7282154fe6fe','SecurityQuestion_5','Y',TO_DATE('2012-09-10 18:24:03','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-10 18:24:03','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:24:04 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200055 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 2:29:52 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_DATE('2012-09-11 14:29:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 2:29:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2012-09-11 14:29:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 2:31:07 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET XPosition=2, ColumnSpan=2,Updated=TO_DATE('2012-09-11 14:31:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200474
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 4:08:26 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO R_MailText (MailText,IsHtml,MailHeader,R_MailText_ID,Name,UpdatedBy,AD_Client_ID,Updated,CreatedBy,AD_Org_ID,IsActive,Created,R_MailText_UU) VALUES ('Dear @Name@,
|
||||
|
||||
You are receiving this email because you (or somebody pretending to be you) said you have lost your iDempiere password.
|
||||
|
||||
To access your iDempiere, use the temporary password from @AD_Client_ID<Name>@ below:
|
||||
@Password@
|
||||
|
||||
Once you login, you will be directed to change password screen. Please change your password to something you can remember.
|
||||
|
||||
Sincerely,
|
||||
The iDempiere Accounts Team
|
||||
|
||||
Note: This email address cannot accept replies.','N','iDempiere Reset Password ',200000,'Reset Password',100,0,TO_DATE('2012-09-11 16:08:24','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2012-09-11 16:08:24','YYYY-MM-DD HH24:MI:SS'),'b8938ab2-d3e8-4cc5-9eae-cf27670d2dae')
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 4:08:26 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO R_MailText_Trl (AD_Language,R_MailText_ID, MailText,MailHeader,MailText2,MailText3,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,R_MailText_Trl_UU ) SELECT l.AD_Language,t.R_MailText_ID, t.MailText,t.MailHeader,t.MailText2,t.MailText3,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, R_MailText t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.R_MailText_ID=200000 AND NOT EXISTS (SELECT * FROM R_MailText_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.R_MailText_ID=t.R_MailText_ID)
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:26:48 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Change Password',200058,'D','1676e190-c252-42c9-b641-76b52145c35c','ChangePassword','Y',TO_DATE('2012-09-11 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-11 18:26:46','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:26:48 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200058 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:27:32 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Invalid User Name and EMail',200059,'D','cf60c2b0-9d9d-4eed-b04e-496ae2fba7e4','InvalidUserNameAndEmail','Y',TO_DATE('2012-09-11 18:27:31','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-11 18:27:31','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:27:32 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200059 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:27:51 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Message SET MsgText='Invalid User Name and EMail!',Updated=TO_DATE('2012-09-11 18:27:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200059
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:27:51 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200059
|
||||
;
|
||||
|
||||
SELECT register_migration_script('907_IDEMPIERE-375.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,354 @@
|
|||
-- Sep 10, 2012 5:10:21 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsExpired',200126,'D','Expired','Expired','875fbbb0-2513-4a00-9f74-001bceab1f24',0,TO_TIMESTAMP('2012-09-10 17:10:19','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-09-10 17:10:19','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:10:22 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200126 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:10:40 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,114,200456,'U','Y','N','N',0,'N',1,'N',20,'N','N',200126,'N','Y','a5c7128b-3935-41c0-aa78-8541972a7171','N','Y','N','IsExpired','N','Expired','Y',100,TO_TIMESTAMP('2012-09-10 17:10:39','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-09-10 17:10:39','YYYY-MM-DD HH24:MI:SS'),100,0,0)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:10:40 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200456 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:10:45 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-09-10 17:10:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200456
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:12:01 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
ALTER TABLE AD_User ADD COLUMN IsExpired CHAR(1) DEFAULT 'N' CHECK (IsExpired IN ('Y','N')) NOT NULL
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:12:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('SecurityQuestion',200127,'D','Security Question','Security Question','11eefd52-bc27-4768-a8ca-71e4c481fd53',0,TO_TIMESTAMP('2012-09-10 17:12:29','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-09-10 17:12:29','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:12:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200127 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:35 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,114,200457,'D','N','N','N',0,'N',255,'N',10,'N','N',200127,'N','Y','b92718ad-ac9d-40d7-929a-a1b34d9982fa','N','Y','N','SecurityQuestion','Security Question','Y',100,TO_TIMESTAMP('2012-09-10 17:14:34','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-09-10 17:14:34','YYYY-MM-DD HH24:MI:SS'),100,0,0)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:35 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200457 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:43 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
ALTER TABLE AD_User ADD COLUMN SecurityQuestion VARCHAR(255) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:58 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('Answer',200128,'D','Answer','Answer','3d07421f-1ebf-49b1-9b0e-d7d4bbb0cc39',0,TO_TIMESTAMP('2012-09-10 17:14:57','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-09-10 17:14:57','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:14:58 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200128 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:16:45 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,114,200458,'U','N','N','N',0,'N',1024,'N',10,'N','N',200128,'N','Y','cc25c82a-78b7-4831-81a2-4eae10c6b839','N','Y','N','Answer','Answer','Y',100,TO_TIMESTAMP('2012-09-10 17:16:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-09-10 17:16:45','YYYY-MM-DD HH24:MI:SS'),100,0,0)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:16:45 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200458 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:16:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-09-10 17:16:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200458
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:18:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
ALTER TABLE AD_User ADD COLUMN Answer VARCHAR(1024) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:19:50 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Reset Password',200044,'D','183be9be-6e0a-4cdc-82fd-c91efabfd586','ResetPassword','Y',TO_TIMESTAMP('2012-09-10 17:19:49','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 17:19:49','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:19:51 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200044 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:20:14 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Security Question',200045,'D','74df2198-589e-4e80-93c3-6b300c5705b5','SecurityQuestion','Y',TO_TIMESTAMP('2012-09-10 17:20:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 17:20:13','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:20:14 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200045 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:20:40 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Answer',200046,'D','494db2ce-7749-4f52-82a1-d7e9448ab864','Answer','Y',TO_TIMESTAMP('2012-09-10 17:20:40','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 17:20:40','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:20:46 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Answer',200047,'D','397a2656-2199-4451-87fe-5850b54957c0','Answer','Y',TO_TIMESTAMP('2012-09-10 17:20:45','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 17:20:45','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:21:23 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Security Question is Mandatory',200048,'D','5c73ed0f-6ca9-45bc-8df7-e85f8bc3471d','SecurityQuestionMandatory','Y',TO_TIMESTAMP('2012-09-10 17:21:22','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 17:21:22','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:21:23 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200048 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:21:43 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Answer is Mandatory',200049,'D','2a9de4c5-671b-4622-a8d4-b0fde148308d','AnswerMandatory','Y',TO_TIMESTAMP('2012-09-10 17:21:43','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 17:21:43','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:21:43 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200049 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:14 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Invalid Security Question and Answer!',200050,'D','2904015f-ffe7-4179-a76d-5748700ea0ee','InvalidSecurityQuestionAndAnswer','Y',TO_TIMESTAMP('2012-09-10 17:22:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 17:22:13','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:14 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200050 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:39 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1024,'N','N',200458,'Y',200473,'N','D','Answer','N','Y','2e16932c-92d6-46a0-be21-70164101b156',100,0,TO_TIMESTAMP('2012-09-10 17:22:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-09-10 17:22:38','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:39 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200473 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:41 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1,'N','N',200456,'Y',200474,'N','D','Expired','N','Y','2b408d81-657b-473b-b425-b97e2d54dd3a',100,0,TO_TIMESTAMP('2012-09-10 17:22:40','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-09-10 17:22:40','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:41 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200474 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:41 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,255,'N','N',200457,'Y',200475,'N','D','Security Question','N','Y','52bbd8a1-d84e-451d-8b79-63a8db9b9dbe',100,0,TO_TIMESTAMP('2012-09-10 17:22:41','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-09-10 17:22:41','YYYY-MM-DD HH24:MI:SS'),'Y')
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:42 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200475 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=200474
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:22:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:06 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNoGrid=390,IsDisplayedGrid='Y' WHERE AD_Field_ID=200474
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:06 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNoGrid=400,IsDisplayedGrid='Y' WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:06 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET SeqNoGrid=410,IsDisplayedGrid='Y' WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:47 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-09-10 17:23:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200474
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:23:51 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-09-10 17:23:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:24:16 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET IsEncrypted='Y', IsSameLine='Y', IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-09-10 17:24:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:24:20 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET IsEncrypted='Y',Updated=TO_TIMESTAMP('2012-09-10 17:24:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:24:59 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET DisplayLength=20,Updated=TO_TIMESTAMP('2012-09-10 17:24:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 5:25:02 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET DisplayLength=20,Updated=TO_TIMESTAMP('2012-09-10 17:25:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:18 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','What was your childhood nickname?',200051,'D','5f1d8902-cf42-4ebc-ac9a-40e08ccdd0e7','SecurityQuestion_1','Y',TO_TIMESTAMP('2012-09-10 18:23:17','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 18:23:17','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:19 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200051 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Who was your childhood hero?',200052,'D','a6c718d8-1c4d-423d-a075-724c61d897bd','SecurityQuestion_2','Y',TO_TIMESTAMP('2012-09-10 18:23:29','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 18:23:29','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:30 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200052 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:42 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','What was the name of your elementary / primary school?',200053,'D','f707f3be-69f3-4c3a-870e-5c366e9b2874','SecurityQuestion_3','Y',TO_TIMESTAMP('2012-09-10 18:23:41','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 18:23:41','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:42 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200053 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:52 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','What are the last 5 digits of your driver''s license number?',200054,'D','c1e63df5-2df9-4970-ae78-24b75411d166','SecurityQuestion_4','Y',TO_TIMESTAMP('2012-09-10 18:23:51','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 18:23:51','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:23:52 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200054 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:24:04 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Where did you meet your spouse / significant other?',200055,'D','0d1ffdfe-7e55-4796-ba95-7282154fe6fe','SecurityQuestion_5','Y',TO_TIMESTAMP('2012-09-10 18:24:03','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-10 18:24:03','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 10, 2012 6:24:04 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200055 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 2:29:52 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2012-09-11 14:29:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200473
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 2:29:56 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2012-09-11 14:29:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200475
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 2:31:07 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Field SET XPosition=2, ColumnSpan=2,Updated=TO_TIMESTAMP('2012-09-11 14:31:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200474
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 4:08:26 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO R_MailText (MailText,IsHtml,MailHeader,R_MailText_ID,Name,UpdatedBy,AD_Client_ID,Updated,CreatedBy,AD_Org_ID,IsActive,Created,R_MailText_UU) VALUES ('Dear @Name@,
|
||||
|
||||
You are receiving this email because you (or somebody pretending to be you) said you have lost your iDempiere password.
|
||||
|
||||
To access your iDempiere, use the temporary password from @AD_Client_ID<Name>@ below:
|
||||
@Password@
|
||||
|
||||
Once you login, you will be directed to change password screen. Please change your password to something you can remember.
|
||||
|
||||
Sincerely,
|
||||
The iDempiere Accounts Team
|
||||
|
||||
Note: This email address cannot accept replies.','N','iDempiere Reset Password ',200000,'Reset Password',100,0,TO_TIMESTAMP('2012-09-11 16:08:24','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2012-09-11 16:08:24','YYYY-MM-DD HH24:MI:SS'),'b8938ab2-d3e8-4cc5-9eae-cf27670d2dae')
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 4:08:26 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO R_MailText_Trl (AD_Language,R_MailText_ID, MailText,MailHeader,MailText2,MailText3,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,R_MailText_Trl_UU ) SELECT l.AD_Language,t.R_MailText_ID, t.MailText,t.MailHeader,t.MailText2,t.MailText3,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, R_MailText t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.R_MailText_ID=200000 AND NOT EXISTS (SELECT * FROM R_MailText_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.R_MailText_ID=t.R_MailText_ID)
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:26:48 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Change Password',200058,'D','1676e190-c252-42c9-b641-76b52145c35c','ChangePassword','Y',TO_TIMESTAMP('2012-09-11 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-11 18:26:46','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:26:48 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200058 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:27:32 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Invalid User Name and EMail',200059,'D','cf60c2b0-9d9d-4eed-b04e-496ae2fba7e4','InvalidUserNameAndEmail','Y',TO_TIMESTAMP('2012-09-11 18:27:31','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-11 18:27:31','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:27:32 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200059 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:27:51 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Message SET MsgText='Invalid User Name and EMail!',Updated=TO_TIMESTAMP('2012-09-11 18:27:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200059
|
||||
;
|
||||
|
||||
-- Sep 11, 2012 6:27:51 PM SGT
|
||||
-- IDEMPIERE-375 Implement Forgot my Password
|
||||
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200059
|
||||
;
|
||||
|
||||
SELECT register_migration_script('907_IDEMPIERE-375.sql') FROM dual
|
||||
;
|
|
@ -97,6 +97,15 @@ public interface I_AD_User
|
|||
/** Get AD_User_UU */
|
||||
public String getAD_User_UU();
|
||||
|
||||
/** Column name Answer */
|
||||
public static final String COLUMNNAME_Answer = "Answer";
|
||||
|
||||
/** Set Answer */
|
||||
public void setAnswer (String Answer);
|
||||
|
||||
/** Get Answer */
|
||||
public String getAnswer();
|
||||
|
||||
/** Column name Birthday */
|
||||
public static final String COLUMNNAME_Birthday = "Birthday";
|
||||
|
||||
|
@ -352,6 +361,15 @@ public interface I_AD_User
|
|||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name IsExpired */
|
||||
public static final String COLUMNNAME_IsExpired = "IsExpired";
|
||||
|
||||
/** Set Expired */
|
||||
public void setIsExpired (boolean IsExpired);
|
||||
|
||||
/** Get Expired */
|
||||
public boolean isExpired();
|
||||
|
||||
/** Column name IsFullBPAccess */
|
||||
public static final String COLUMNNAME_IsFullBPAccess = "IsFullBPAccess";
|
||||
|
||||
|
@ -535,6 +553,15 @@ public interface I_AD_User
|
|||
*/
|
||||
public String getSalt();
|
||||
|
||||
/** Column name SecurityQuestion */
|
||||
public static final String COLUMNNAME_SecurityQuestion = "SecurityQuestion";
|
||||
|
||||
/** Set Security Question */
|
||||
public void setSecurityQuestion (String SecurityQuestion);
|
||||
|
||||
/** Get Security Question */
|
||||
public String getSecurityQuestion();
|
||||
|
||||
/** Column name Supervisor_ID */
|
||||
public static final String COLUMNNAME_Supervisor_ID = "Supervisor_ID";
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20120830L;
|
||||
private static final long serialVersionUID = 20120910L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_User (Properties ctx, int AD_User_ID, String trxName)
|
||||
|
@ -42,6 +42,8 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
|
|||
setAD_User_ID (0);
|
||||
setFailedLoginCount (0);
|
||||
// 0
|
||||
setIsExpired (false);
|
||||
// N
|
||||
setIsFullBPAccess (true);
|
||||
// Y
|
||||
setIsInPayroll (false);
|
||||
|
@ -144,6 +146,20 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_AD_User_UU);
|
||||
}
|
||||
|
||||
/** Set Answer.
|
||||
@param Answer Answer */
|
||||
public void setAnswer (String Answer)
|
||||
{
|
||||
set_Value (COLUMNNAME_Answer, Answer);
|
||||
}
|
||||
|
||||
/** Get Answer.
|
||||
@return Answer */
|
||||
public String getAnswer ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Answer);
|
||||
}
|
||||
|
||||
/** Set Birthday.
|
||||
@param Birthday
|
||||
Birthday or Anniversary day
|
||||
|
@ -496,6 +512,27 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_Fax);
|
||||
}
|
||||
|
||||
/** Set Expired.
|
||||
@param IsExpired Expired */
|
||||
public void setIsExpired (boolean IsExpired)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsExpired, Boolean.valueOf(IsExpired));
|
||||
}
|
||||
|
||||
/** Get Expired.
|
||||
@return Expired */
|
||||
public boolean isExpired ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsExpired);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Full BP Access.
|
||||
@param IsFullBPAccess
|
||||
The user/contact has full access to Business Partner information and resources
|
||||
|
@ -803,6 +840,20 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_Salt);
|
||||
}
|
||||
|
||||
/** Set Security Question.
|
||||
@param SecurityQuestion Security Question */
|
||||
public void setSecurityQuestion (String SecurityQuestion)
|
||||
{
|
||||
set_Value (COLUMNNAME_SecurityQuestion, SecurityQuestion);
|
||||
}
|
||||
|
||||
/** Get Security Question.
|
||||
@return Security Question */
|
||||
public String getSecurityQuestion ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_SecurityQuestion);
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_User getSupervisor() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
|
||||
|
|
|
@ -1412,15 +1412,20 @@ public class Login
|
|||
if (user.isLocked())
|
||||
continue;
|
||||
|
||||
if (MAX_PASSWORD_AGE > 0 && !user.isNoPasswordReset())
|
||||
if (user.isExpired())
|
||||
isPasswordExpired = true;
|
||||
else if (MAX_PASSWORD_AGE > 0 && !user.isNoPasswordReset())
|
||||
{
|
||||
if (user.getDatePasswordChanged() == null)
|
||||
user.setDatePasswordChanged(new Timestamp(now));
|
||||
|
||||
long days = (now - user.getDatePasswordChanged().getTime()) / (1000 * 60 * 60 * 24);
|
||||
if (days > MAX_PASSWORD_AGE)
|
||||
{
|
||||
user.setIsExpired(true);
|
||||
isPasswordExpired = true;
|
||||
}
|
||||
}
|
||||
|
||||
StringBuffer sql= new StringBuffer("SELECT DISTINCT cli.AD_Client_ID, cli.Name, u.AD_User_ID, u.Name");
|
||||
sql.append(" FROM AD_User_Roles ur")
|
||||
|
|
|
@ -63,6 +63,7 @@ import org.compiere.util.KeyNamePair;
|
|||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Login;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Trx;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
|
@ -119,6 +120,9 @@ public final class ALogin extends CDialog
|
|||
private static final int CONNECTED_OK = 0;
|
||||
private static final int CONNECTED_OK_WITH_PASSWORD_EXPIRED = 1;
|
||||
|
||||
/* private static final int NO_OF_SECURITY_QUESTION = 5;
|
||||
private static final String SECURITY_QUESTION_PREFIX = "SecurityQuestion_";
|
||||
*/
|
||||
private CPanel mainPanel = new CPanel(new BorderLayout());
|
||||
private CTabbedPane loginTabPane = new CTabbedPane();
|
||||
private CPanel connectionPanel = new CPanel();
|
||||
|
@ -165,7 +169,11 @@ public final class ALogin extends CDialog
|
|||
private JPasswordField txtNewPassword = new JPasswordField();
|
||||
private JPasswordField txtRetypeNewPassword = new JPasswordField();
|
||||
//
|
||||
|
||||
/* private CLabel lblSecurityQuestion = new CLabel();
|
||||
private CLabel lblAnswer = new CLabel();
|
||||
private VComboBox lstSecurityQuestion = new VComboBox();
|
||||
private CTextField txtAnswer = new CTextField();
|
||||
*/
|
||||
/** Server Connection */
|
||||
private CConnection m_cc;
|
||||
/** Application User */
|
||||
|
@ -374,6 +382,22 @@ public final class ALogin extends CDialog
|
|||
lblRetypeNewPassword.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
lblRetypeNewPassword.setText(Msg.getMsg(m_ctx, "New Password Confirm"));
|
||||
|
||||
/* lstSecurityQuestion.setName("lstSecurityQuestion");
|
||||
lblSecurityQuestion.setRequestFocusEnabled(false);
|
||||
lblSecurityQuestion.setLabelFor(lstSecurityQuestion);
|
||||
lblSecurityQuestion.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
lblSecurityQuestion.setText(Msg.getMsg(m_ctx, "SecurityQuestion"));
|
||||
|
||||
lstSecurityQuestion.removeAllItems();
|
||||
for (int i = 1; i <= NO_OF_SECURITY_QUESTION; i++)
|
||||
lstSecurityQuestion.addItem(new ValueNamePair(SECURITY_QUESTION_PREFIX + i, Msg.getMsg(m_ctx, SECURITY_QUESTION_PREFIX + i)));
|
||||
|
||||
txtAnswer.setName("txtAnswer");
|
||||
lblAnswer.setRequestFocusEnabled(false);
|
||||
lblAnswer.setLabelFor(txtAnswer);
|
||||
lblAnswer.setHorizontalAlignment(SwingConstants.RIGHT);
|
||||
lblAnswer.setText(Msg.getMsg(m_ctx, "Answer"));
|
||||
*/
|
||||
changePasswordPanel.setLayout(changePasswordPanelLayout);
|
||||
|
||||
changePasswordPanel.add(lblOldPassword, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
|
||||
|
@ -388,7 +412,15 @@ public final class ALogin extends CDialog
|
|||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
changePasswordPanel.add(txtRetypeNewPassword, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
loginTabPane.add(changePasswordPanel, res.getString("ChangePassword"));
|
||||
/* changePasswordPanel.add(lblSecurityQuestion, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
changePasswordPanel.add(lstSecurityQuestion, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
changePasswordPanel.add(lblAnswer, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0
|
||||
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
|
||||
changePasswordPanel.add(txtAnswer, new GridBagConstraints(1, 4, 1, 1, 1.0, 0.0
|
||||
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
|
||||
*/ loginTabPane.add(changePasswordPanel, res.getString("ChangePassword"));
|
||||
loginTabPane.setEnabledAt(TAB_CHANGE_PASSWORD, false);
|
||||
//
|
||||
|
||||
|
@ -624,6 +656,12 @@ public final class ALogin extends CDialog
|
|||
String newPassword = new String(txtNewPassword.getPassword());
|
||||
String retypeNewPassword = new String(txtRetypeNewPassword.getPassword());
|
||||
|
||||
/* String securityQuestion = null;
|
||||
if (lstSecurityQuestion.getSelectedItem() != null)
|
||||
securityQuestion = ((ValueNamePair) lstSecurityQuestion.getSelectedItem()).getValue();
|
||||
|
||||
String answer = txtAnswer.getText();
|
||||
*/
|
||||
if (Util.isEmpty(oldPassword))
|
||||
{
|
||||
statusBar.setStatusLine(Msg.getMsg(m_ctx, "OldPasswordMandatory"), true);
|
||||
|
@ -642,6 +680,18 @@ public final class ALogin extends CDialog
|
|||
return;
|
||||
}
|
||||
|
||||
/* if (Util.isEmpty(securityQuestion))
|
||||
{
|
||||
statusBar.setStatusLine(Msg.getMsg(m_ctx, "SecurityQuestionMandatory"), true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Util.isEmpty(answer))
|
||||
{
|
||||
statusBar.setStatusLine(Msg.getMsg(m_ctx, "AnswerMandatory"), true);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
String m_userPassword = new String(m_pwd);
|
||||
if (!oldPassword.equals(m_userPassword))
|
||||
{
|
||||
|
@ -649,6 +699,12 @@ public final class ALogin extends CDialog
|
|||
return;
|
||||
}
|
||||
|
||||
Trx trx = null;
|
||||
try
|
||||
{
|
||||
String trxName = Trx.createTrxName("ChangePasswordTrx");
|
||||
trx = Trx.get(trxName, true);
|
||||
|
||||
for (int index = 0; index < clientCombo.getItemCount(); index++)
|
||||
{
|
||||
KeyNamePair clientKNPair = (KeyNamePair) clientCombo.getItemAt(index);
|
||||
|
@ -657,13 +713,35 @@ public final class ALogin extends CDialog
|
|||
MUser user = MUser.get(m_ctx, m_user);
|
||||
if (user == null)
|
||||
{
|
||||
trx.rollback();
|
||||
log.severe("Could not find user '" + m_user + "'");
|
||||
statusBar.setStatusLine("Could not find user '" + m_user + "'", true);
|
||||
return;
|
||||
}
|
||||
|
||||
user.setPassword(newPassword);
|
||||
user.saveEx();
|
||||
user.setIsExpired(false);
|
||||
/* user.setSecurityQuestion(securityQuestion);
|
||||
user.setAnswer(answer);
|
||||
*/ if (!user.save(trx.getTrxName()))
|
||||
{
|
||||
trx.rollback();
|
||||
statusBar.setStatusLine("Could not update user", true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
trx.commit();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (trx != null)
|
||||
trx.rollback();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (trx != null)
|
||||
trx.close();
|
||||
}
|
||||
|
||||
passwordField.setText(newPassword);
|
||||
|
|
|
@ -90,7 +90,19 @@ public final class AEnv
|
|||
*/
|
||||
public static void showCenterScreen(Window window)
|
||||
{
|
||||
if (SessionManager.getAppDesktop() != null)
|
||||
SessionManager.getAppDesktop().showWindow(window, "center");
|
||||
else
|
||||
{
|
||||
window.setPosition("center");
|
||||
window.setPage(getDesktop().getFirstPage());
|
||||
Object objMode = window.getAttribute(Window.MODE_KEY);
|
||||
final String mode = objMode != null ? objMode.toString() : Window.MODE_HIGHLIGHTED;
|
||||
if (Window.MODE_MODAL.equals(mode))
|
||||
window.doModal();
|
||||
else
|
||||
window.doHighlighted();
|
||||
}
|
||||
} // showCenterScreen
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.util.Properties;
|
|||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.webui.AdempiereIdGenerator;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.component.Combobox;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
|
@ -33,6 +34,7 @@ import org.compiere.util.CLogger;
|
|||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Trx;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zhtml.Div;
|
||||
import org.zkoss.zhtml.Table;
|
||||
|
@ -71,9 +73,13 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
|||
private Label lblOldPassword;
|
||||
private Label lblNewPassword;
|
||||
private Label lblRetypeNewPassword;
|
||||
private Label lblSecurityQuestion;
|
||||
private Label lblAnswer;
|
||||
private Combobox lstSecurityQuestion;
|
||||
private Textbox txtOldPassword;
|
||||
private Textbox txtNewPassword;
|
||||
private Textbox txtRetypeNewPassword;
|
||||
private Textbox txtAnswer;
|
||||
|
||||
public ChangePasswordPanel(Properties ctx, LoginWindow loginWindow, String userName, String userPassword, boolean show, KeyNamePair[] clientsKNPairs)
|
||||
{
|
||||
|
@ -93,7 +99,7 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
|||
{
|
||||
Div div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_HEADER_CLASS);
|
||||
Label label = new Label("Login");
|
||||
Label label = new Label(Msg.getMsg(m_ctx, "ChangePassword"));
|
||||
label.setSclass(ITheme.LOGIN_BOX_HEADER_TXT_CLASS);
|
||||
div.appendChild(label);
|
||||
this.appendChild(div);
|
||||
|
@ -117,7 +123,7 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
|||
td.appendChild(image);
|
||||
|
||||
tr = new Tr();
|
||||
tr.setId("rowUser");
|
||||
tr.setId("rowOldPassword");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
|
@ -152,6 +158,30 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
|||
tr.appendChild(td);
|
||||
td.appendChild(txtRetypeNewPassword);
|
||||
|
||||
tr = new Tr();
|
||||
tr.setId("rowSecurityQuestion");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblSecurityQuestion);
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(lstSecurityQuestion);
|
||||
|
||||
tr = new Tr();
|
||||
tr.setId("rowAnswer");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblAnswer);
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(txtAnswer);
|
||||
|
||||
div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
||||
ConfirmPanel pnlButtons = new ConfirmPanel(true);
|
||||
|
@ -178,6 +208,25 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
|||
lblRetypeNewPassword.setId("lblRetypeNewPassword");
|
||||
lblRetypeNewPassword.setValue(Msg.getMsg(m_ctx, "New Password Confirm"));
|
||||
|
||||
lblSecurityQuestion = new Label();
|
||||
lblSecurityQuestion.setId("lblSecurityQuestion");
|
||||
lblSecurityQuestion.setValue(Msg.getMsg(m_ctx, "SecurityQuestion"));
|
||||
|
||||
lblAnswer = new Label();
|
||||
lblAnswer.setId("lblAnswer");
|
||||
lblAnswer.setValue(Msg.getMsg(m_ctx, "Answer"));
|
||||
|
||||
lstSecurityQuestion = new Combobox();
|
||||
lstSecurityQuestion.setAutocomplete(true);
|
||||
lstSecurityQuestion.setAutodrop(true);
|
||||
lstSecurityQuestion.setId("lstSecurityQuestion");
|
||||
lstSecurityQuestion.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + lstSecurityQuestion.getId());
|
||||
lstSecurityQuestion.setWidth("220px");
|
||||
|
||||
lstSecurityQuestion.getItems().clear();
|
||||
for (int i = 1; i <= ResetPasswordPanel.NO_OF_SECURITY_QUESTION; i++)
|
||||
lstSecurityQuestion.appendItem(Msg.getMsg(m_ctx, ResetPasswordPanel.SECURITY_QUESTION_PREFIX + i), ResetPasswordPanel.SECURITY_QUESTION_PREFIX + i);
|
||||
|
||||
txtOldPassword = new Textbox();
|
||||
txtOldPassword.setId("txtOldPassword");
|
||||
txtOldPassword.setType("password");
|
||||
|
@ -198,6 +247,13 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
|||
txtRetypeNewPassword.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtNewPassword.getId());
|
||||
txtRetypeNewPassword.setCols(25);
|
||||
txtRetypeNewPassword.setWidth("220px");
|
||||
|
||||
txtAnswer = new Textbox();
|
||||
txtAnswer.setId("txtAnswer");
|
||||
// txtAnswer.setType("password");
|
||||
txtAnswer.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtAnswer.getId());
|
||||
txtAnswer.setCols(25);
|
||||
txtAnswer.setWidth("220px");
|
||||
}
|
||||
|
||||
public void onEvent(Event event)
|
||||
|
@ -219,6 +275,12 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
|||
String newPassword = txtNewPassword.getValue();
|
||||
String retypeNewPassword = txtRetypeNewPassword.getValue();
|
||||
|
||||
String securityQuestion = null;
|
||||
if (lstSecurityQuestion.getSelectedItem() != null)
|
||||
securityQuestion = (String) lstSecurityQuestion.getSelectedItem().getValue();
|
||||
|
||||
String answer = txtAnswer.getValue();
|
||||
|
||||
if (Util.isEmpty(oldPassword))
|
||||
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "OldPasswordMandatory"));
|
||||
|
||||
|
@ -228,9 +290,21 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
|||
if (!newPassword.equals(retypeNewPassword))
|
||||
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "PasswordNotMatch"));
|
||||
|
||||
if (Util.isEmpty(securityQuestion))
|
||||
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "SecurityQuestionMandatory"));
|
||||
|
||||
if (Util.isEmpty(answer))
|
||||
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "AnswerMandatory"));
|
||||
|
||||
if (!oldPassword.equals(m_userPassword))
|
||||
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "OldPasswordNoMatch"));
|
||||
|
||||
Trx trx = null;
|
||||
try
|
||||
{
|
||||
String trxName = Trx.createTrxName("ChangePasswordTrx");
|
||||
trx = Trx.get(trxName, true);
|
||||
|
||||
for (KeyNamePair clientKNPair : m_clientKNPairs)
|
||||
{
|
||||
int clientId = clientKNPair.getKey();
|
||||
|
@ -238,12 +312,33 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
|||
MUser user = MUser.get(m_ctx, m_userName);
|
||||
if (user == null)
|
||||
{
|
||||
trx.rollback();
|
||||
logger.severe("Could not find user '" + m_userName + "'");
|
||||
throw new AdempiereException("Could not find user");
|
||||
}
|
||||
|
||||
user.setPassword(newPassword);
|
||||
user.saveEx();
|
||||
user.setIsExpired(false);
|
||||
user.setSecurityQuestion(securityQuestion);
|
||||
user.setAnswer(answer);
|
||||
if (!user.save(trx.getTrxName()))
|
||||
{
|
||||
trx.rollback();
|
||||
throw new AdempiereException("Could not update user");
|
||||
}
|
||||
}
|
||||
|
||||
trx.commit();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (trx != null)
|
||||
trx.rollback();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (trx != null)
|
||||
trx.close();
|
||||
}
|
||||
|
||||
wndLogin.loginOk(m_userName, m_show, m_clientKNPairs);
|
||||
|
|
|
@ -39,6 +39,7 @@ import org.adempiere.webui.component.Combobox;
|
|||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.ToolBarButton;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.event.TokenEvent;
|
||||
import org.adempiere.webui.exception.ApplicationException;
|
||||
|
@ -62,6 +63,7 @@ import org.compiere.util.KeyNamePair;
|
|||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Login;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.lang.Strings;
|
||||
import org.zkoss.util.Locales;
|
||||
import org.zkoss.web.Attributes;
|
||||
|
@ -112,6 +114,7 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
private LoginWindow wndLogin;
|
||||
private Checkbox chkRememberMe;
|
||||
private Checkbox chkSelectRole;
|
||||
private ToolBarButton btnResetPassword;
|
||||
boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
|
||||
|
||||
public LoginPanel(Properties ctx, LoginWindow loginWindow)
|
||||
|
@ -216,9 +219,21 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(chkRememberMe);
|
||||
|
||||
}
|
||||
|
||||
tr = new Tr();
|
||||
tr.setId("rowResetPassword");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(new Label(""));
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(btnResetPassword);
|
||||
btnResetPassword.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
||||
ConfirmPanel pnlButtons = new ConfirmPanel(false);
|
||||
|
@ -333,6 +348,8 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
|
||||
chkSelectRole = new Checkbox(Msg.getMsg(Language.getBaseAD_Language(), "SelectRole"));
|
||||
|
||||
btnResetPassword = new ToolBarButton(Msg.getMsg(Language.getBaseAD_Language(), "ResetPassword"));
|
||||
|
||||
// Make the default language the language of client System
|
||||
String defaultLanguage = MClient.get(ctx, 0).getAD_Language();
|
||||
for(int i = 0; i < lstLanguage.getItemCount(); i++)
|
||||
|
@ -362,6 +379,10 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
languageChanged(langName);
|
||||
}
|
||||
}
|
||||
else if (event.getTarget() == btnResetPassword)
|
||||
{
|
||||
btnResetPasswordClicked();
|
||||
}
|
||||
// Elaine 2009/02/06 - initial language
|
||||
else if (event.getName().equals(Events.ON_CHANGE))
|
||||
{
|
||||
|
@ -435,7 +456,7 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
lblLanguage.setValue(res.getString("Language"));
|
||||
chkRememberMe.setLabel(Msg.getMsg(language, "RememberMe"));
|
||||
chkSelectRole.setLabel(Msg.getMsg(language, "SelectRole"));
|
||||
|
||||
btnResetPassword.setLabel(Msg.getMsg(language, "ResetPassword"));
|
||||
}
|
||||
|
||||
private Language findLanguage(String langName) {
|
||||
|
@ -546,4 +567,34 @@ public class LoginPanel extends Window implements EventListener<Event>
|
|||
return s;
|
||||
}
|
||||
|
||||
private void btnResetPasswordClicked()
|
||||
{
|
||||
String userId = txtUserId.getValue();
|
||||
if (Util.isEmpty(userId))
|
||||
throw new IllegalArgumentException(Msg.getMsg(ctx, "FillMandatory") + " " + lblUserId.getValue());
|
||||
|
||||
boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
|
||||
StringBuilder whereClause = new StringBuilder("Password IS NOT NULL AND ");
|
||||
if (email_login)
|
||||
whereClause.append("EMail=?");
|
||||
else
|
||||
whereClause.append("COALESCE(LDAPUser,Name)=?");
|
||||
whereClause.append(" AND")
|
||||
.append(" EXISTS (SELECT * FROM AD_User_Roles ur")
|
||||
.append(" INNER JOIN AD_Role r ON (ur.AD_Role_ID=r.AD_Role_ID)")
|
||||
.append(" WHERE ur.AD_User_ID=AD_User.AD_User_ID AND ur.IsActive='Y' AND r.IsActive='Y') AND ")
|
||||
.append(" EXISTS (SELECT * FROM AD_Client c")
|
||||
.append(" WHERE c.AD_Client_ID=AD_User.AD_Client_ID")
|
||||
.append(" AND c.IsActive='Y') AND ")
|
||||
.append(" AD_User.IsActive='Y'")
|
||||
.append(" AND AD_User.SecurityQuestion IS NOT NULL")
|
||||
.append(" AND AD_User.Answer IS NOT NULL");
|
||||
|
||||
List<MUser> users = new Query(ctx, MUser.Table_Name, whereClause.toString(), null)
|
||||
.setParameters(userId)
|
||||
.setOrderBy(MUser.COLUMNNAME_AD_User_ID)
|
||||
.list();
|
||||
|
||||
wndLogin.resetPassword(userId, users.size() == 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,430 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2012 Elaine Tan *
|
||||
* Copyright (C) 2012 Trek Global
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
package org.adempiere.webui.panel;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.webui.AdempiereIdGenerator;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.component.Combobox;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.theme.ITheme;
|
||||
import org.adempiere.webui.theme.ThemeManager;
|
||||
import org.adempiere.webui.window.LoginWindow;
|
||||
import org.compiere.model.MClient;
|
||||
import org.compiere.model.MMailText;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.MUser;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.EMail;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Trx;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zhtml.Div;
|
||||
import org.zkoss.zhtml.Table;
|
||||
import org.zkoss.zhtml.Td;
|
||||
import org.zkoss.zhtml.Tr;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Image;
|
||||
|
||||
/**
|
||||
* Reset Password Panel
|
||||
* @author Elaine
|
||||
* @date September 10, 2012
|
||||
*/
|
||||
public class ResetPasswordPanel extends Window implements EventListener<Event>
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 190270426336225224L;
|
||||
|
||||
private static CLogger logger = CLogger.getCLogger(ResetPasswordPanel.class);
|
||||
|
||||
private static final int MAX_RESET_PASSWORD_TRIES = 3;
|
||||
protected static final int NO_OF_SECURITY_QUESTION = 5;
|
||||
protected static final String SECURITY_QUESTION_PREFIX = "SecurityQuestion_";
|
||||
private static final String RESET_PASSWORD_MAIL_TEXT_NAME = "Reset Password";
|
||||
|
||||
private LoginWindow wndLogin;
|
||||
|
||||
/** Context */
|
||||
private Properties m_ctx;
|
||||
/** Username */
|
||||
private String m_userName;
|
||||
/** No Security Question */
|
||||
private boolean m_noSecurityQuestion;
|
||||
/** Tries Counter */
|
||||
private int counter;
|
||||
|
||||
private Label lblSecurityQuestion;
|
||||
private Label lblAnswer;
|
||||
private Label lblUserId;
|
||||
private Combobox lstSecurityQuestion;
|
||||
private Textbox txtAnswer;
|
||||
private Textbox txtUserId;
|
||||
|
||||
public ResetPasswordPanel(Properties ctx, LoginWindow loginWindow, String userName, boolean noSecurityQuestion)
|
||||
{
|
||||
this.wndLogin = loginWindow;
|
||||
m_ctx = ctx;
|
||||
m_userName = userName;
|
||||
m_noSecurityQuestion = noSecurityQuestion;
|
||||
|
||||
initComponents();
|
||||
init();
|
||||
this.setId("resetPasswordPanel");
|
||||
}
|
||||
|
||||
private void init()
|
||||
{
|
||||
Div div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_HEADER_CLASS);
|
||||
Label label = new Label(Msg.getMsg(m_ctx, "ResetPassword"));
|
||||
label.setSclass(ITheme.LOGIN_BOX_HEADER_TXT_CLASS);
|
||||
div.appendChild(label);
|
||||
this.appendChild(div);
|
||||
|
||||
Table table = new Table();
|
||||
table.setId("grdResetPassword");
|
||||
table.setDynamicProperty("cellpadding", "0");
|
||||
table.setDynamicProperty("cellspacing", "5");
|
||||
table.setSclass(ITheme.LOGIN_BOX_BODY_CLASS);
|
||||
|
||||
this.appendChild(table);
|
||||
|
||||
Tr tr = new Tr();
|
||||
table.appendChild(tr);
|
||||
Td td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_BOX_HEADER_LOGO_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.setDynamicProperty("colspan", "2");
|
||||
Image image = new Image();
|
||||
image.setSrc(ThemeManager.getLargeLogo());
|
||||
td.appendChild(image);
|
||||
|
||||
if (m_noSecurityQuestion)
|
||||
{
|
||||
tr = new Tr();
|
||||
tr.setId("rowUser");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblUserId);
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(txtUserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
tr = new Tr();
|
||||
tr.setId("rowSecurityQuestion");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblSecurityQuestion);
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(lstSecurityQuestion);
|
||||
|
||||
tr = new Tr();
|
||||
tr.setId("rowAnswer");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblAnswer);
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(txtAnswer);
|
||||
}
|
||||
|
||||
div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
||||
ConfirmPanel pnlButtons = new ConfirmPanel(true);
|
||||
pnlButtons.addActionListener(this);
|
||||
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
|
||||
pnlButtons.setWidth(null);
|
||||
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
||||
pnlButtons.getButton(ConfirmPanel.A_CANCEL).setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
||||
div.appendChild(pnlButtons);
|
||||
this.appendChild(div);
|
||||
}
|
||||
|
||||
private void initComponents()
|
||||
{
|
||||
if (m_noSecurityQuestion)
|
||||
{
|
||||
boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
|
||||
lblUserId = new Label();
|
||||
lblUserId.setId("lblUserId");
|
||||
lblUserId.setValue(email_login ? Msg.getMsg(m_ctx, "Name") : Msg.getMsg(m_ctx, "EMail"));
|
||||
|
||||
txtUserId = new Textbox();
|
||||
txtUserId.setId("txtUserId");
|
||||
txtUserId.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtUserId.getId());
|
||||
txtUserId.setCols(25);
|
||||
txtUserId.setMaxlength(40);
|
||||
txtUserId.setWidth("220px");
|
||||
}
|
||||
else
|
||||
{
|
||||
lblSecurityQuestion = new Label();
|
||||
lblSecurityQuestion.setId("lblSecurityQuestion");
|
||||
lblSecurityQuestion.setValue(Msg.getMsg(m_ctx, "SecurityQuestion"));
|
||||
|
||||
lblAnswer = new Label();
|
||||
lblAnswer.setId("lblAnswer");
|
||||
lblAnswer.setValue(Msg.getMsg(m_ctx, "Answer"));
|
||||
|
||||
lstSecurityQuestion = new Combobox();
|
||||
lstSecurityQuestion.setAutocomplete(true);
|
||||
lstSecurityQuestion.setAutodrop(true);
|
||||
lstSecurityQuestion.setId("lstSecurityQuestion");
|
||||
lstSecurityQuestion.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + lstSecurityQuestion.getId());
|
||||
lstSecurityQuestion.setWidth("220px");
|
||||
|
||||
lstSecurityQuestion.getItems().clear();
|
||||
for (int i = 1; i <= NO_OF_SECURITY_QUESTION; i++)
|
||||
lstSecurityQuestion.appendItem(Msg.getMsg(m_ctx, SECURITY_QUESTION_PREFIX + i), SECURITY_QUESTION_PREFIX + i);
|
||||
|
||||
txtAnswer = new Textbox();
|
||||
txtAnswer.setId("txtAnswer");
|
||||
// txtAnswer.setType("password");
|
||||
txtAnswer.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtAnswer.getId());
|
||||
txtAnswer.setCols(25);
|
||||
txtAnswer.setWidth("220px");
|
||||
}
|
||||
}
|
||||
|
||||
public void onEvent(Event event)
|
||||
{
|
||||
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
validateResetPassword();
|
||||
}
|
||||
else if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||
{
|
||||
SessionManager.logoutSession();
|
||||
wndLogin.loginCancelled();
|
||||
}
|
||||
}
|
||||
|
||||
public void validateResetPassword()
|
||||
{
|
||||
List<MUser> users = null;
|
||||
if (m_noSecurityQuestion)
|
||||
{
|
||||
String userId = txtUserId.getValue();
|
||||
if (Util.isEmpty(userId))
|
||||
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "FillMandatory") + " " + lblUserId.getValue());
|
||||
|
||||
StringBuilder whereClause = new StringBuilder("Password IS NOT NULL ");
|
||||
boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
|
||||
if (email_login)
|
||||
{
|
||||
whereClause.append("AND EMail=? ");
|
||||
whereClause.append("AND COALESCE(LDAPUser,Name)=? ");
|
||||
}
|
||||
else
|
||||
{
|
||||
whereClause.append("AND COALESCE(LDAPUser,Name)=? ");
|
||||
whereClause.append("AND EMail=? ");
|
||||
}
|
||||
whereClause.append(" AND")
|
||||
.append(" EXISTS (SELECT * FROM AD_User_Roles ur")
|
||||
.append(" INNER JOIN AD_Role r ON (ur.AD_Role_ID=r.AD_Role_ID)")
|
||||
.append(" WHERE ur.AD_User_ID=AD_User.AD_User_ID AND ur.IsActive='Y' AND r.IsActive='Y') AND ")
|
||||
.append(" EXISTS (SELECT * FROM AD_Client c")
|
||||
.append(" WHERE c.AD_Client_ID=AD_User.AD_Client_ID")
|
||||
.append(" AND c.IsActive='Y') AND ")
|
||||
.append(" AD_User.IsActive='Y'");
|
||||
|
||||
users = new Query(m_ctx, MUser.Table_Name, whereClause.toString(), null)
|
||||
.setParameters(m_userName, userId)
|
||||
.setOrderBy(MUser.COLUMNNAME_AD_User_ID)
|
||||
.list();
|
||||
}
|
||||
else
|
||||
{
|
||||
String securityQuestion = null;
|
||||
if (lstSecurityQuestion.getSelectedItem() != null)
|
||||
securityQuestion = (String) lstSecurityQuestion.getSelectedItem().getValue();
|
||||
|
||||
String answer = txtAnswer.getValue();
|
||||
|
||||
if (Util.isEmpty(securityQuestion))
|
||||
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "SecurityQuestionMandatory"));
|
||||
|
||||
if (Util.isEmpty(answer))
|
||||
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "AnswerMandatory"));
|
||||
|
||||
boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
|
||||
StringBuilder whereClause = new StringBuilder("Password IS NOT NULL AND ");
|
||||
if (email_login)
|
||||
whereClause.append("EMail=?");
|
||||
else
|
||||
whereClause.append("COALESCE(LDAPUser,Name)=?");
|
||||
whereClause.append(" AND")
|
||||
.append(" EXISTS (SELECT * FROM AD_User_Roles ur")
|
||||
.append(" INNER JOIN AD_Role r ON (ur.AD_Role_ID=r.AD_Role_ID)")
|
||||
.append(" WHERE ur.AD_User_ID=AD_User.AD_User_ID AND ur.IsActive='Y' AND r.IsActive='Y') AND ")
|
||||
.append(" EXISTS (SELECT * FROM AD_Client c")
|
||||
.append(" WHERE c.AD_Client_ID=AD_User.AD_Client_ID")
|
||||
.append(" AND c.IsActive='Y') AND ")
|
||||
.append(" AD_User.IsActive='Y'")
|
||||
.append(" AND AD_User.SecurityQuestion=?")
|
||||
.append(" AND AD_User.Answer=?");
|
||||
|
||||
users = new Query(m_ctx, MUser.Table_Name, whereClause.toString(), null)
|
||||
.setParameters(m_userName, securityQuestion, answer)
|
||||
.setOrderBy(MUser.COLUMNNAME_AD_User_ID)
|
||||
.list();
|
||||
}
|
||||
|
||||
if (users.size() == 0)
|
||||
{
|
||||
String errMsg = m_noSecurityQuestion ? Msg.getMsg(m_ctx, "InvalidUserNameAndEmail") : Msg.getMsg(m_ctx, "InvalidSecurityQuestionAndAnswer");
|
||||
++counter;
|
||||
|
||||
if (counter >= MAX_RESET_PASSWORD_TRIES)
|
||||
{
|
||||
counter = 0;
|
||||
SessionManager.logoutSession();
|
||||
wndLogin.loginCancelled();
|
||||
}
|
||||
throw new AdempiereException(errMsg);
|
||||
}
|
||||
|
||||
boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false);
|
||||
|
||||
StringBuilder sqlUpdate = new StringBuilder("UPDATE AD_User ");
|
||||
sqlUpdate.append("SET IsExpired='Y', Password=? ");
|
||||
sqlUpdate.append("WHERE AD_User_ID=? ");
|
||||
|
||||
SecureRandom random = new SecureRandom();
|
||||
String newPassword = BigInteger.probablePrime(50, random).toString(Character.MAX_RADIX);
|
||||
|
||||
String errorMsg = "";
|
||||
Trx trx = null;
|
||||
try
|
||||
{
|
||||
String trxName = Trx.createTrxName("ResetPasswordTrx");
|
||||
trx = Trx.get(trxName, true);
|
||||
|
||||
for (MUser user : users)
|
||||
{
|
||||
user.set_TrxName(trx.getTrxName());
|
||||
|
||||
user.setPassword(newPassword);
|
||||
if (hash_password)
|
||||
user.setPassword(user.getPassword());
|
||||
// use SQL to update the password to skip password rule validation
|
||||
int no = DB.executeUpdate(sqlUpdate.toString(), new Object[] {user.getPassword(), user.getAD_User_ID()}, false, trx.getTrxName());
|
||||
if (no <= 0)
|
||||
{
|
||||
trx.rollback();
|
||||
logger.severe("Failed to update user '" + m_userName + "'");
|
||||
throw new AdempiereException("Failed to update user");
|
||||
}
|
||||
|
||||
if (sendEmail(user, newPassword))
|
||||
logger.fine(user.getEMail());
|
||||
else
|
||||
{
|
||||
if (errorMsg.length() > 0)
|
||||
errorMsg += ", ";
|
||||
errorMsg += user.getEMail();
|
||||
logger.warning("Failed to send email to user - " + user.getEMail());
|
||||
}
|
||||
}
|
||||
|
||||
trx.commit();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (trx != null)
|
||||
trx.rollback();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (trx != null)
|
||||
trx.close();
|
||||
}
|
||||
|
||||
if (errorMsg.length() > 0)
|
||||
throw new AdempiereException(Msg.getMsg(m_ctx, "RequestActionEMailError") + ": " + errorMsg);
|
||||
else
|
||||
{
|
||||
SessionManager.logoutSession();
|
||||
wndLogin.loginCancelled();
|
||||
// FDialog.info(0, this, Msg.getMsg(m_ctx, "RequestActionEMailOK"));
|
||||
}
|
||||
}
|
||||
|
||||
private boolean sendEmail(MUser to, String newPassword)
|
||||
{
|
||||
MClient client = MClient.get(m_ctx, to.getAD_Client_ID());
|
||||
|
||||
StringBuilder sql = new StringBuilder("SELECT R_MailText_ID ");
|
||||
sql.append("FROM R_MailText ");
|
||||
sql.append("WHERE IsActive='Y' ");
|
||||
sql.append("AND Name=? ");
|
||||
sql.append("AND AD_Client_ID IN (?, 0) ");
|
||||
sql.append("ORDER BY AD_Client_ID ");
|
||||
|
||||
int R_MailText_ID = DB.getSQLValue(null, sql.toString(), RESET_PASSWORD_MAIL_TEXT_NAME, to.getAD_Client_ID());
|
||||
if (R_MailText_ID <= 0)
|
||||
return false;
|
||||
|
||||
MMailText mailText = new MMailText(m_ctx, R_MailText_ID, null);
|
||||
to.setPassword(newPassword);
|
||||
mailText.setUser(to);
|
||||
String message = mailText.getMailText(true);
|
||||
message = Env.parseVariable(message, to, to.get_TrxName(), true);
|
||||
EMail email = client.createEMail(to.getEMail(), mailText.getMailHeader(), message, mailText.isHtml());
|
||||
if (mailText.isHtml())
|
||||
email.setMessageHTML(mailText.getMailHeader(), message);
|
||||
else
|
||||
{
|
||||
email.setSubject(mailText.getMailHeader());
|
||||
email.setMessageText(message);
|
||||
}
|
||||
if (!email.isValid() && !email.isValid(true))
|
||||
{
|
||||
logger.warning("NOT VALID - " + email);
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return EMail.SENT_OK.equals(email.send());
|
||||
}
|
||||
}
|
|
@ -30,6 +30,7 @@ import org.adempiere.webui.IWebClient;
|
|||
import org.adempiere.webui.component.FWindow;
|
||||
import org.adempiere.webui.panel.ChangePasswordPanel;
|
||||
import org.adempiere.webui.panel.LoginPanel;
|
||||
import org.adempiere.webui.panel.ResetPasswordPanel;
|
||||
import org.adempiere.webui.panel.RolePanel;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.MUser;
|
||||
|
@ -50,7 +51,7 @@ import org.zkoss.zk.ui.event.Events;
|
|||
* @author <a href="mailto:sendy.yagambrum@posterita.org">Sendy Yagambrum</a>
|
||||
* @date July 18, 2007
|
||||
*/
|
||||
public class LoginWindow extends FWindow implements EventListener
|
||||
public class LoginWindow extends FWindow implements EventListener<Event>
|
||||
{
|
||||
/**
|
||||
*
|
||||
|
@ -60,6 +61,7 @@ public class LoginWindow extends FWindow implements EventListener
|
|||
private IWebClient app;
|
||||
private Properties ctx;
|
||||
private LoginPanel pnlLogin;
|
||||
private ResetPasswordPanel pnlResetPassword;
|
||||
private ChangePasswordPanel pnlChangePassword;
|
||||
private RolePanel pnlRole;
|
||||
|
||||
|
@ -98,6 +100,13 @@ public class LoginWindow extends FWindow implements EventListener
|
|||
this.appendChild(pnlChangePassword);
|
||||
}
|
||||
|
||||
public void resetPassword(String userName, boolean noSecurityQuestion)
|
||||
{
|
||||
pnlResetPassword = new ResetPasswordPanel(ctx, this, userName, noSecurityQuestion);
|
||||
this.getChildren().clear();
|
||||
this.appendChild(pnlResetPassword);
|
||||
}
|
||||
|
||||
public void loginCompleted()
|
||||
{
|
||||
app.loginCompleted();
|
||||
|
|
Loading…
Reference in New Issue