IDEMPIERE-373 Implement User Locking

This commit is contained in:
Elaine Tan 2012-09-04 11:11:01 +08:00
parent f2c61f9054
commit 078684b68d
13 changed files with 2285 additions and 82 deletions

View File

@ -0,0 +1,705 @@
-- Aug 30, 2012 3:45:37 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('IsLocked',200111,'U','Locked','Locked','0988d4d3-c46e-4d51-8474-38d81b16ad57',0,TO_DATE('2012-08-30 15:45:36','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 15:45:36','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:45:38 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200111 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)
;
-- Aug 30, 2012 3:46:11 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200404,'D','Y','N','N',0,'N',1,'N',20,'N','N',200111,'N','Y','fb4326ef-4bb7-405e-8e76-5d0a178c6f70','N','Y','N','IsLocked','''N''','Locked','Y',100,TO_DATE('2012-08-30 15:46:11','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-30 15:46:11','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:46:12 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200404 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)
;
-- Aug 30, 2012 3:46:16 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD IsLocked CHAR(1) DEFAULT 'N' CHECK (IsLocked IN ('Y','N')) NOT NULL
;
-- Aug 30, 2012 3:46:30 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Element SET EntityType='D',Updated=TO_DATE('2012-08-30 15:46:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200111
;
-- Aug 30, 2012 3:47:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('DateAccountLocked',200112,'D','Date Account Locked','Date Account Locked','1214f78d-8511-40ff-90d1-0ea2f2e8ba18',0,TO_DATE('2012-08-30 15:47:02','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 15:47:02','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:47:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200112 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)
;
-- Aug 30, 2012 3:47:42 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200405,'U','N','N','N',0,'N',7,'N',16,'N','N',200112,'N','Y','c7f6d455-4956-4a11-a528-ee007dd3c49d','N','Y','N','DateAccountLocked','Date Account Locked','Y',100,TO_DATE('2012-08-30 15:47:42','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-30 15:47:42','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:47:43 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200405 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)
;
-- Aug 30, 2012 3:47:50 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-08-30 15:47:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200405
;
-- Aug 30, 2012 3:47:53 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD DateAccountLocked DATE DEFAULT NULL
;
-- Aug 30, 2012 3:48:22 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('FailedLoginCount',200113,'D','Failed Login Count','Failed Login Count','a9cb3baf-263d-48c4-86b5-36f629403eb3',0,TO_DATE('2012-08-30 15:48:21','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 15:48:21','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:48:22 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200113 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)
;
-- Aug 30, 2012 3:48:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200406,'D','Y','N','N',0,'N',14,'N',11,'N','N',200113,'N','Y','8d212739-78bc-4c64-ba6e-8365008e2d4c','N','Y','N','FailedLoginCount','0','Failed Login Count','Y',100,TO_DATE('2012-08-30 15:48:51','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-30 15:48:51','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:48:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200406 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)
;
-- Aug 30, 2012 3:48:56 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD FailedLoginCount NUMBER(10) DEFAULT 0 NOT NULL
;
-- Aug 30, 2012 3:49:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('DatePasswordChanged',200114,'U','Date Password Changed','Date Password Changed','0f29bfb6-4517-4490-848c-be9db13468f9',0,TO_DATE('2012-08-30 15:49:19','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 15:49:19','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:49:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200114 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)
;
-- Aug 30, 2012 3:49:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200407,'U','N','N','N',0,'N',7,'N',16,'N','N',200114,'N','Y','1c04e2e3-8910-490d-a459-5cb1a3ec5a1d','N','Y','N','DatePasswordChanged','Date Password Changed','Y',100,TO_DATE('2012-08-30 15:49:32','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-30 15:49:32','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:49:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200407 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)
;
-- Aug 30, 2012 3:49:37 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD DatePasswordChanged DATE DEFAULT NULL
;
-- Aug 30, 2012 3:50:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('DateLastLogin',200115,'U','Date Last Login','Date Last Login','584365fe-c1d2-4378-9650-b56b1462b59e',0,TO_DATE('2012-08-30 15:49:59','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 15:49:59','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:50:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200115 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)
;
-- Aug 30, 2012 3:50:12 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200408,'U','N','N','N',0,'N',7,'N',16,'N','N',200115,'N','Y','6885fa87-4608-418c-a5d7-d94875c7ac91','N','Y','N','DateLastLogin','Date Last Login','Y',100,TO_DATE('2012-08-30 15:50:11','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-30 15:50:11','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:50:12 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200408 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)
;
-- Aug 30, 2012 3:50:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-08-30 15:50:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200408
;
-- Aug 30, 2012 3:50:21 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD DateLastLogin DATE DEFAULT NULL
;
-- Aug 30, 2012 3:51:46 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('IsNoPasswordReset',200116,'D','No Password Reset','No Password Reset','b265e8c9-04e2-442a-acbb-f98edaf292b9',0,TO_DATE('2012-08-30 15:51:45','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 15:51:45','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:51:46 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200116 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)
;
-- Aug 30, 2012 3:52:10 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200409,'D','Y','N','N',0,'N',1,'N',20,'N','N',200116,'N','Y','c5b7f0e4-8e88-4614-a39e-783c2d74d4fc','N','Y','N','IsNoPasswordReset','''N''','No Password Reset','Y',100,TO_DATE('2012-08-30 15:52:10','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-08-30 15:52:10','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:52:10 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200409 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)
;
-- Aug 30, 2012 3:52:12 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD IsNoPasswordReset CHAR(1) DEFAULT 'N' CHECK (IsNoPasswordReset IN ('Y','N')) NOT NULL
;
-- Aug 30, 2012 3:52:32 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,36,'N','N',60528,'Y',200399,'N','D','AD_User_UU','Y','N','a332188e-d618-4c95-a703-6e2a169ca9ac',100,0,TO_DATE('2012-08-30 15:52:31','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-30 15:52:31','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200399 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)
;
-- Aug 30, 2012 3:52:34 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,7,'N','N',200405,'Y',200400,'N','D','Date Account Locked','Y','N','dc64d823-725e-44f9-865e-7009e9eea0bb',100,0,TO_DATE('2012-08-30 15:52:33','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-30 15:52:33','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:34 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200400 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)
;
-- Aug 30, 2012 3:52:34 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,7,'N','N',200408,'Y',200401,'N','D','Date Last Login','Y','N','49dbb591-067c-4136-ad03-434309b8545f',100,0,TO_DATE('2012-08-30 15:52:34','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-30 15:52:34','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:34 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200401 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)
;
-- Aug 30, 2012 3:52:35 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,7,'N','N',200407,'Y',200402,'N','U','Date Password Changed','Y','N','ff1d49b7-2ce7-490f-ae95-e1ec42b6cb4b',100,0,TO_DATE('2012-08-30 15:52:34','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-30 15:52:34','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:35 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200402 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)
;
-- Aug 30, 2012 3:52:36 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,14,'N','N',200406,'Y',200403,'N','D','Failed Login Count','Y','N','153b851b-eb43-4245-8572-e7d4ed591424',100,0,TO_DATE('2012-08-30 15:52:35','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-30 15:52:35','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:36 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200403 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)
;
-- Aug 30, 2012 3:52:36 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1,'N','N',56294,'Y',200404,'N','EE02','Defined if any User Contact will be used for Calculate Payroll','Is In Payroll','Y','N','88e0446c-706d-4770-b27b-2c10622d40ba',100,0,TO_DATE('2012-08-30 15:52:36','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-30 15:52:36','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:36 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200404 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)
;
-- Aug 30, 2012 3:52:37 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1,'N','N',200404,'Y',200405,'N','D','Locked','Y','N','b5b96ad1-f11d-483b-8dbf-4def8027da50',100,0,TO_DATE('2012-08-30 15:52:36','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-30 15:52:36','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:37 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200405 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)
;
-- Aug 30, 2012 3:52:38 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1,'N','N',200409,'Y',200406,'N','D','No Password Reset','Y','N','9ca76696-1087-4b68-96a3-feb02cf251d5',100,0,TO_DATE('2012-08-30 15:52:37','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-30 15:52:37','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:38 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200406 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)
;
-- Aug 30, 2012 3:52:39 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,16,'N','N',61756,'Y',200407,'N','D','Random data added to improve password hash effectiveness','Salt','Y','N','90d88711-04b2-48d4-b6f6-f93fbe73549a',100,0,TO_DATE('2012-08-30 15:52:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-08-30 15:52:38','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:39 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200407 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)
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200399
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200404
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200407
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=200405
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=200403
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200399
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200404
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200407
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=330,IsDisplayedGrid='Y' WHERE AD_Field_ID=200405
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y' WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y' WHERE AD_Field_ID=200403
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=360,IsDisplayedGrid='Y' WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=370,IsDisplayedGrid='Y' WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=380,IsDisplayedGrid='Y' WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 3:54:40 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET EntityType='D',Updated=TO_DATE('2012-08-30 15:54:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 3:55:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-08-30 15:55:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200407
;
-- Aug 30, 2012 3:55:10 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Element SET EntityType='D',Updated=TO_DATE('2012-08-30 15:55:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200114
;
-- Aug 30, 2012 3:55:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-08-30 15:55:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 3:55:42 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-08-30 15:55:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 3:55:49 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-08-30 15:55:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 3:56:11 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_FieldGroup (FieldGroupType,EntityType,IsCollapsedByDefault,Name,AD_FieldGroup_ID,AD_FieldGroup_UU,AD_Client_ID,Created,CreatedBy,Updated,AD_Org_ID,UpdatedBy,IsActive) VALUES ('C','D','N','User Locking',200003,'b6c15362-01ee-4ed5-8fd2-003f437cb7c1',0,TO_DATE('2012-08-30 15:56:11','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-08-30 15:56:11','YYYY-MM-DD HH24:MI:SS'),0,100,'Y')
;
-- Aug 30, 2012 3:56:11 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_FieldGroup_Trl (AD_Language,AD_FieldGroup_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_FieldGroup_Trl_UU ) SELECT l.AD_Language,t.AD_FieldGroup_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_FieldGroup t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_FieldGroup_ID=200003 AND NOT EXISTS (SELECT * FROM AD_FieldGroup_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_FieldGroup_ID=t.AD_FieldGroup_ID)
;
-- Aug 30, 2012 3:56:20 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_DATE('2012-08-30 15:56:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200405
;
-- Aug 30, 2012 3:56:27 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_DATE('2012-08-30 15:56:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 3:56:32 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_DATE('2012-08-30 15:56:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200403
;
-- Aug 30, 2012 3:56:38 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_DATE('2012-08-30 15:56:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 3:56:44 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_DATE('2012-08-30 15:56:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 3:56:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_DATE('2012-08-30 15:56:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 3:58:46 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Created,Updated,AD_Client_ID,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name) VALUES (200015,'D','S','0','Maximum account locking in minutes','d42a65e6-5b90-429f-b8cd-1fb004a890f2',TO_DATE('2012-08-30 15:58:45','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 15:58:45','YYYY-MM-DD HH24:MI:SS'),0,0,100,'Y',100,'USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES')
;
-- Aug 30, 2012 3:59:27 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Created,Updated,AD_Client_ID,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name) VALUES (200016,'D','S','0','Maximum number of login attempts','bbde394f-2529-49ba-b69f-1625627f0027',TO_DATE('2012-08-30 15:59:26','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 15:59:26','YYYY-MM-DD HH24:MI:SS'),0,0,100,'Y',100,'USER_LOCKING_MAX_LOGIN_ATTEMPT')
;
-- Aug 30, 2012 4:00:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Created,Updated,AD_Client_ID,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name) VALUES (200017,'D','S','0','Maximum password age in days','320e810f-b63d-4109-9321-917ff9572efb',TO_DATE('2012-08-30 16:00:51','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 16:00:51','YYYY-MM-DD HH24:MI:SS'),0,0,100,'Y',100,'USER_LOCKING_MAX_PASSWORD_AGE_DAY')
;
-- Aug 30, 2012 4:31:32 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 4:31:32 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 4:31:40 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=370,IsDisplayedGrid='Y' WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 4:31:40 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=380,IsDisplayedGrid='Y' WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 4:31:53 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-08-30 16:31:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200405
;
-- Aug 30, 2012 4:31:56 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-08-30 16:31:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 4:32:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-08-30 16:32:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200403
;
-- Aug 30, 2012 4:32:05 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-08-30 16:32:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 4:32:09 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='N',Updated=TO_DATE('2012-08-30 16:32:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 4:32:14 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='Y', IsReadOnly='Y',Updated=TO_DATE('2012-08-30 16:32:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 6:22:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Created,Updated,AD_Client_ID,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name) VALUES (200018,'U','S','0','Maximum inactive period in days','04227b57-47e8-4b0c-a401-2cf6b280443d',TO_DATE('2012-08-30 18:22:01','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-08-30 18:22:01','YYYY-MM-DD HH24:MI:SS'),0,0,100,'Y',100,'USER_LOCKING_MAX_INACTIVE_PERIOD_DAY')
;
-- Aug 30, 2012 6:22:23 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_SysConfig SET EntityType='D',Updated=TO_DATE('2012-08-30 18:22:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=200018
;
-- Sep 3, 2012 6:50:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process (Help,AD_Process_ID,IsDirectPrint,IsReport,AD_Process_UU,AccessLevel,IsBetaFunctionality,IsServerProcess,Statistic_Seconds,Statistic_Count,ShowHelp,EntityType,Classname,Description,Name,Value,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,IsActive,CreatedBy) VALUES (NULL,200008,'N','N','4527cc85-0076-4ebf-9907-33efc94f25a3','7','N','N',0,0,'Y','U','org.adempiere.process.ResetLockedAccount','Reset Locked Account for User','Reset Locked Account','AD_User_LockedAccount',0,0,TO_DATE('2012-09-03 18:50:01','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-09-03 18:50:01','YYYY-MM-DD HH24:MI:SS'),'Y',100)
;
-- Sep 3, 2012 6:50:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Process_Trl_UU ) SELECT l.AD_Language,t.AD_Process_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_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=200008 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID)
;
-- Sep 3, 2012 6:50:09 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Process SET EntityType='D',Updated=TO_DATE('2012-09-03 18:50:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200008
;
-- Sep 3, 2012 6:50:46 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Para (IsRange,AD_Element_ID,AD_Process_Para_ID,AD_Process_Para_UU,Help,AD_Process_ID,AD_Reference_ID,IsMandatory,EntityType,Name,ColumnName,Description,FieldLength,IsCentrallyMaintained,SeqNo,IsActive,UpdatedBy,Updated,CreatedBy,Created,AD_Org_ID,AD_Client_ID,IsEncrypted) VALUES ('N',102,200029,'7fec47ef-1b60-4537-a356-c036c7474e77','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200008,19,'Y','D','Client','AD_Client_ID','Client/Tenant for this installation.',0,'Y',10,'Y',100,TO_DATE('2012-09-03 18:50:46','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-09-03 18:50:46','YYYY-MM-DD HH24:MI:SS'),0,0,'N')
;
-- Sep 3, 2012 6:50:47 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Process_Para_Trl_UU ) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=200029 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID)
;
-- Sep 3, 2012 6:51:14 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Para (IsRange,AD_Element_ID,AD_Process_Para_ID,AD_Process_Para_UU,Help,AD_Process_ID,AD_Reference_ID,IsMandatory,EntityType,Name,ColumnName,Description,FieldLength,IsCentrallyMaintained,SeqNo,IsActive,UpdatedBy,Updated,CreatedBy,Created,AD_Org_ID,AD_Client_ID,IsEncrypted) VALUES ('N',138,200030,'646405c2-cba9-452b-b62f-265d209d1dff','The User identifies a unique user in the system. This could be an internal user or a business partner contact',200008,19,'N','U','User/Contact','AD_User_ID','User within the system - Internal or Business Partner Contact',0,'Y',20,'Y',100,TO_DATE('2012-09-03 18:51:13','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-09-03 18:51:13','YYYY-MM-DD HH24:MI:SS'),0,0,'N')
;
-- Sep 3, 2012 6:51:14 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Process_Para_Trl_UU ) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=200030 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID)
;
-- Sep 3, 2012 6:52:17 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Menu (AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,AD_Process_ID,EntityType,IsCentrallyMaintained,Name,Description,Action,AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200012,'N','N','N',200008,'D','Y','Reset Locked Account','Reset Locked Account for User','P','5c6927d6-fb4d-4762-b023-af032f963d74','Y',0,100,TO_DATE('2012-09-03 18:52:16','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-09-03 18:52:16','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Sep 3, 2012 6:52:17 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Menu_Trl_UU ) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200012 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID)
;
-- Sep 3, 2012 6:52:17 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 100, SysDate, 100,t.AD_Tree_ID, 200012, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200012)
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200002
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=147
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53246
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=487
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200012
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=150
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=495
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=50007
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=362
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200001
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=475
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=366
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=483
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=368
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=14, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=508
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=15, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53348
;
-- Sep 3, 2012 6:53:50 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','Old Password',200027,'D','c9b0a4a7-642f-4256-a77e-e0e41b112b37','Old Password','Y',TO_DATE('2012-09-03 18:53:50','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-03 18:53:50','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200027 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 3, 2012 6:54:02 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','New Password',200028,'D','66f34194-4995-488f-8abc-78d382617a76','New Password','Y',TO_DATE('2012-09-03 18:54:01','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-03 18:54:01','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:54:02 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200028 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 3, 2012 6:54:13 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','New Password Confirm',200029,'D','b78295fc-eeec-4db7-ac8d-260f14e56de8','New Password Confirm','Y',TO_DATE('2012-09-03 18:54:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-03 18:54:13','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:54:14 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200029 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 3, 2012 6:55:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','New Password Confirm is Mandatory',200030,'D','b649b8ea-97f5-408a-81bd-12eb0e8ae388','NewPasswordConfirmMandatory','Y',TO_DATE('2012-09-03 18:54:59','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-03 18:54:59','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:55:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200030 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 3, 2012 6:56:29 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','Password does not match the confirm password',200031,'D','10fdcb04-bc7c-4c30-b149-570231862faf','PasswordNotMatch','Y',TO_DATE('2012-09-03 18:56:28','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-09-03 18:56:28','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:56:29 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200031 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 3, 2012 6:57:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message SET MsgText='Confirm New Password',Updated=TO_DATE('2012-09-03 18:57:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200029
;
-- Sep 3, 2012 6:57:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200029
;
-- Sep 3, 2012 6:58:08 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message SET MsgText='Confirm New Password is Mandatory',Updated=TO_DATE('2012-09-03 18:58:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200030
;
-- Sep 3, 2012 6:58:08 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200030
;
-- Sep 3, 2012 6:58:20 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message SET MsgText='Password does not match the Confirm Password',Updated=TO_DATE('2012-09-03 18:58:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200031
;
-- Sep 3, 2012 6:58:20 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200031
;
UPDATE AD_System
SET LastMigrationScriptApplied='898_IDEMPIERE-373_User_Locking.sql'
WHERE LastMigrationScriptApplied<'898_IDEMPIERE-373_User_Locking.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,705 @@
-- Aug 30, 2012 3:45:37 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('IsLocked',200111,'U','Locked','Locked','0988d4d3-c46e-4d51-8474-38d81b16ad57',0,TO_TIMESTAMP('2012-08-30 15:45:36','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 15:45:36','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:45:38 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200111 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)
;
-- Aug 30, 2012 3:46:11 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200404,'D','Y','N','N',0,'N',1,'N',20,'N','N',200111,'N','Y','fb4326ef-4bb7-405e-8e76-5d0a178c6f70','N','Y','N','IsLocked','''N''','Locked','Y',100,TO_TIMESTAMP('2012-08-30 15:46:11','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-30 15:46:11','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:46:12 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200404 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)
;
-- Aug 30, 2012 3:46:16 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD COLUMN IsLocked CHAR(1) DEFAULT 'N' CHECK (IsLocked IN ('Y','N')) NOT NULL
;
-- Aug 30, 2012 3:46:30 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Element SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-30 15:46:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200111
;
-- Aug 30, 2012 3:47:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('DateAccountLocked',200112,'D','Date Account Locked','Date Account Locked','1214f78d-8511-40ff-90d1-0ea2f2e8ba18',0,TO_TIMESTAMP('2012-08-30 15:47:02','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 15:47:02','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:47:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200112 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)
;
-- Aug 30, 2012 3:47:42 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200405,'U','N','N','N',0,'N',7,'N',16,'N','N',200112,'N','Y','c7f6d455-4956-4a11-a528-ee007dd3c49d','N','Y','N','DateAccountLocked','Date Account Locked','Y',100,TO_TIMESTAMP('2012-08-30 15:47:42','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-30 15:47:42','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:47:43 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200405 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)
;
-- Aug 30, 2012 3:47:50 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-30 15:47:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200405
;
-- Aug 30, 2012 3:47:53 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD COLUMN DateAccountLocked TIMESTAMP DEFAULT NULL
;
-- Aug 30, 2012 3:48:22 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('FailedLoginCount',200113,'D','Failed Login Count','Failed Login Count','a9cb3baf-263d-48c4-86b5-36f629403eb3',0,TO_TIMESTAMP('2012-08-30 15:48:21','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 15:48:21','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:48:22 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200113 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)
;
-- Aug 30, 2012 3:48:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200406,'D','Y','N','N',0,'N',14,'N',11,'N','N',200113,'N','Y','8d212739-78bc-4c64-ba6e-8365008e2d4c','N','Y','N','FailedLoginCount','0','Failed Login Count','Y',100,TO_TIMESTAMP('2012-08-30 15:48:51','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-30 15:48:51','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:48:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200406 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)
;
-- Aug 30, 2012 3:48:56 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD COLUMN FailedLoginCount NUMERIC(10) DEFAULT '0' NOT NULL
;
-- Aug 30, 2012 3:49:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('DatePasswordChanged',200114,'U','Date Password Changed','Date Password Changed','0f29bfb6-4517-4490-848c-be9db13468f9',0,TO_TIMESTAMP('2012-08-30 15:49:19','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 15:49:19','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:49:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200114 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)
;
-- Aug 30, 2012 3:49:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200407,'U','N','N','N',0,'N',7,'N',16,'N','N',200114,'N','Y','1c04e2e3-8910-490d-a459-5cb1a3ec5a1d','N','Y','N','DatePasswordChanged','Date Password Changed','Y',100,TO_TIMESTAMP('2012-08-30 15:49:32','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-30 15:49:32','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:49:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200407 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)
;
-- Aug 30, 2012 3:49:37 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD COLUMN DatePasswordChanged TIMESTAMP DEFAULT NULL
;
-- Aug 30, 2012 3:50:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('DateLastLogin',200115,'U','Date Last Login','Date Last Login','584365fe-c1d2-4378-9650-b56b1462b59e',0,TO_TIMESTAMP('2012-08-30 15:49:59','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 15:49:59','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:50:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200115 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)
;
-- Aug 30, 2012 3:50:12 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200408,'U','N','N','N',0,'N',7,'N',16,'N','N',200115,'N','Y','6885fa87-4608-418c-a5d7-d94875c7ac91','N','Y','N','DateLastLogin','Date Last Login','Y',100,TO_TIMESTAMP('2012-08-30 15:50:11','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-30 15:50:11','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:50:12 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200408 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)
;
-- Aug 30, 2012 3:50:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-30 15:50:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200408
;
-- Aug 30, 2012 3:50:21 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD COLUMN DateLastLogin TIMESTAMP DEFAULT NULL
;
-- Aug 30, 2012 3:51:46 PM SGT
-- IDEMPIERE-373 Implement User Locking
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 ('IsNoPasswordReset',200116,'D','No Password Reset','No Password Reset','b265e8c9-04e2-442a-acbb-f98edaf292b9',0,TO_TIMESTAMP('2012-08-30 15:51:45','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 15:51:45','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Aug 30, 2012 3:51:46 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, 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.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_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_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200116 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)
;
-- Aug 30, 2012 3:52:10 PM SGT
-- IDEMPIERE-373 Implement User Locking
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,200409,'D','Y','N','N',0,'N',1,'N',20,'N','N',200116,'N','Y','c5b7f0e4-8e88-4614-a39e-783c2d74d4fc','N','Y','N','IsNoPasswordReset','''N''','No Password Reset','Y',100,TO_TIMESTAMP('2012-08-30 15:52:10','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-08-30 15:52:10','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Aug 30, 2012 3:52:10 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200409 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)
;
-- Aug 30, 2012 3:52:12 PM SGT
-- IDEMPIERE-373 Implement User Locking
ALTER TABLE AD_User ADD COLUMN IsNoPasswordReset CHAR(1) DEFAULT 'N' CHECK (IsNoPasswordReset IN ('Y','N')) NOT NULL
;
-- Aug 30, 2012 3:52:32 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,36,'N','N',60528,'Y',200399,'N','D','AD_User_UU','Y','N','a332188e-d618-4c95-a703-6e2a169ca9ac',100,0,TO_TIMESTAMP('2012-08-30 15:52:31','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-30 15:52:31','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200399 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)
;
-- Aug 30, 2012 3:52:34 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,7,'N','N',200405,'Y',200400,'N','D','Date Account Locked','Y','N','dc64d823-725e-44f9-865e-7009e9eea0bb',100,0,TO_TIMESTAMP('2012-08-30 15:52:33','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-30 15:52:33','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:34 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200400 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)
;
-- Aug 30, 2012 3:52:34 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,7,'N','N',200408,'Y',200401,'N','D','Date Last Login','Y','N','49dbb591-067c-4136-ad03-434309b8545f',100,0,TO_TIMESTAMP('2012-08-30 15:52:34','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-30 15:52:34','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:34 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200401 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)
;
-- Aug 30, 2012 3:52:35 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,7,'N','N',200407,'Y',200402,'N','U','Date Password Changed','Y','N','ff1d49b7-2ce7-490f-ae95-e1ec42b6cb4b',100,0,TO_TIMESTAMP('2012-08-30 15:52:34','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-30 15:52:34','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:35 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200402 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)
;
-- Aug 30, 2012 3:52:36 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,14,'N','N',200406,'Y',200403,'N','D','Failed Login Count','Y','N','153b851b-eb43-4245-8572-e7d4ed591424',100,0,TO_TIMESTAMP('2012-08-30 15:52:35','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-30 15:52:35','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:36 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200403 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)
;
-- Aug 30, 2012 3:52:36 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1,'N','N',56294,'Y',200404,'N','EE02','Defined if any User Contact will be used for Calculate Payroll','Is In Payroll','Y','N','88e0446c-706d-4770-b27b-2c10622d40ba',100,0,TO_TIMESTAMP('2012-08-30 15:52:36','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-30 15:52:36','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:36 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200404 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)
;
-- Aug 30, 2012 3:52:37 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1,'N','N',200404,'Y',200405,'N','D','Locked','Y','N','b5b96ad1-f11d-483b-8dbf-4def8027da50',100,0,TO_TIMESTAMP('2012-08-30 15:52:36','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-30 15:52:36','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:37 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200405 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)
;
-- Aug 30, 2012 3:52:38 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,1,'N','N',200409,'Y',200406,'N','D','No Password Reset','Y','N','9ca76696-1087-4b68-96a3-feb02cf251d5',100,0,TO_TIMESTAMP('2012-08-30 15:52:37','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-30 15:52:37','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:38 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200406 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)
;
-- Aug 30, 2012 3:52:39 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',118,16,'N','N',61756,'Y',200407,'N','D','Random data added to improve password hash effectiveness','Salt','Y','N','90d88711-04b2-48d4-b6f6-f93fbe73549a',100,0,TO_TIMESTAMP('2012-08-30 15:52:38','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-08-30 15:52:38','YYYY-MM-DD HH24:MI:SS'),'Y')
;
-- Aug 30, 2012 3:52:39 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200407 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)
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200399
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200404
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=200407
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=200405
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=200403
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 3:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200399
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200404
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=200407
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=330,IsDisplayedGrid='Y' WHERE AD_Field_ID=200405
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=340,IsDisplayedGrid='Y' WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=350,IsDisplayedGrid='Y' WHERE AD_Field_ID=200403
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=360,IsDisplayedGrid='Y' WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=370,IsDisplayedGrid='Y' WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 3:54:19 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=380,IsDisplayedGrid='Y' WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 3:54:40 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-30 15:54:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 3:55:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-30 15:55:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200407
;
-- Aug 30, 2012 3:55:10 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Element SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-30 15:55:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200114
;
-- Aug 30, 2012 3:55:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-08-30 15:55:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 3:55:42 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-08-30 15:55:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 3:55:49 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-08-30 15:55:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 3:56:11 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_FieldGroup (FieldGroupType,EntityType,IsCollapsedByDefault,Name,AD_FieldGroup_ID,AD_FieldGroup_UU,AD_Client_ID,Created,CreatedBy,Updated,AD_Org_ID,UpdatedBy,IsActive) VALUES ('C','D','N','User Locking',200003,'b6c15362-01ee-4ed5-8fd2-003f437cb7c1',0,TO_TIMESTAMP('2012-08-30 15:56:11','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-08-30 15:56:11','YYYY-MM-DD HH24:MI:SS'),0,100,'Y')
;
-- Aug 30, 2012 3:56:11 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_FieldGroup_Trl (AD_Language,AD_FieldGroup_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_FieldGroup_Trl_UU ) SELECT l.AD_Language,t.AD_FieldGroup_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_FieldGroup t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_FieldGroup_ID=200003 AND NOT EXISTS (SELECT * FROM AD_FieldGroup_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_FieldGroup_ID=t.AD_FieldGroup_ID)
;
-- Aug 30, 2012 3:56:20 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_TIMESTAMP('2012-08-30 15:56:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200405
;
-- Aug 30, 2012 3:56:27 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_TIMESTAMP('2012-08-30 15:56:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 3:56:32 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_TIMESTAMP('2012-08-30 15:56:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200403
;
-- Aug 30, 2012 3:56:38 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_TIMESTAMP('2012-08-30 15:56:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 3:56:44 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_TIMESTAMP('2012-08-30 15:56:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 3:56:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET AD_FieldGroup_ID=200003,Updated=TO_TIMESTAMP('2012-08-30 15:56:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 3:58:46 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Created,Updated,AD_Client_ID,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name) VALUES (200015,'D','S','0','Maximum account locking in minutes','d42a65e6-5b90-429f-b8cd-1fb004a890f2',TO_TIMESTAMP('2012-08-30 15:58:45','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 15:58:45','YYYY-MM-DD HH24:MI:SS'),0,0,100,'Y',100,'USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES')
;
-- Aug 30, 2012 3:59:27 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Created,Updated,AD_Client_ID,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name) VALUES (200016,'D','S','0','Maximum number of login attempts','bbde394f-2529-49ba-b69f-1625627f0027',TO_TIMESTAMP('2012-08-30 15:59:26','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 15:59:26','YYYY-MM-DD HH24:MI:SS'),0,0,100,'Y',100,'USER_LOCKING_MAX_LOGIN_ATTEMPT')
;
-- Aug 30, 2012 4:00:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Created,Updated,AD_Client_ID,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name) VALUES (200017,'D','S','0','Maximum password age in days','320e810f-b63d-4109-9321-917ff9572efb',TO_TIMESTAMP('2012-08-30 16:00:51','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 16:00:51','YYYY-MM-DD HH24:MI:SS'),0,0,100,'Y',100,'USER_LOCKING_MAX_PASSWORD_AGE_DAY')
;
-- Aug 30, 2012 4:31:32 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 4:31:32 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 4:31:40 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=370,IsDisplayedGrid='Y' WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 4:31:40 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET SeqNoGrid=380,IsDisplayedGrid='Y' WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 4:31:53 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-08-30 16:31:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200405
;
-- Aug 30, 2012 4:31:56 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-08-30 16:31:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200400
;
-- Aug 30, 2012 4:32:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-08-30 16:32:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200403
;
-- Aug 30, 2012 4:32:05 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-08-30 16:32:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200401
;
-- Aug 30, 2012 4:32:09 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='N',Updated=TO_TIMESTAMP('2012-08-30 16:32:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200406
;
-- Aug 30, 2012 4:32:14 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Field SET IsSameLine='Y', IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-08-30 16:32:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200402
;
-- Aug 30, 2012 6:22:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_SysConfig (AD_SysConfig_ID,EntityType,ConfigurationLevel,Value,Description,AD_SysConfig_UU,Created,Updated,AD_Client_ID,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name) VALUES (200018,'U','S','0','Maximum inactive period in days','04227b57-47e8-4b0c-a401-2cf6b280443d',TO_TIMESTAMP('2012-08-30 18:22:01','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-08-30 18:22:01','YYYY-MM-DD HH24:MI:SS'),0,0,100,'Y',100,'USER_LOCKING_MAX_INACTIVE_PERIOD_DAY')
;
-- Aug 30, 2012 6:22:23 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_SysConfig SET EntityType='D',Updated=TO_TIMESTAMP('2012-08-30 18:22:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=200018
;
-- Sep 3, 2012 6:50:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process (Help,AD_Process_ID,IsDirectPrint,IsReport,AD_Process_UU,AccessLevel,IsBetaFunctionality,IsServerProcess,Statistic_Seconds,Statistic_Count,ShowHelp,EntityType,Classname,Description,Name,Value,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,IsActive,CreatedBy) VALUES (NULL,200008,'N','N','4527cc85-0076-4ebf-9907-33efc94f25a3','7','N','N',0,0,'Y','U','org.adempiere.process.ResetLockedAccount','Reset Locked Account for User','Reset Locked Account','AD_User_LockedAccount',0,0,TO_TIMESTAMP('2012-09-03 18:50:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-09-03 18:50:01','YYYY-MM-DD HH24:MI:SS'),'Y',100)
;
-- Sep 3, 2012 6:50:03 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Process_Trl_UU ) SELECT l.AD_Language,t.AD_Process_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_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=200008 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID)
;
-- Sep 3, 2012 6:50:09 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Process SET EntityType='D',Updated=TO_TIMESTAMP('2012-09-03 18:50:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200008
;
-- Sep 3, 2012 6:50:46 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Para (IsRange,AD_Element_ID,AD_Process_Para_ID,AD_Process_Para_UU,Help,AD_Process_ID,AD_Reference_ID,IsMandatory,EntityType,Name,ColumnName,Description,FieldLength,IsCentrallyMaintained,SeqNo,IsActive,UpdatedBy,Updated,CreatedBy,Created,AD_Org_ID,AD_Client_ID,IsEncrypted) VALUES ('N',102,200029,'7fec47ef-1b60-4537-a356-c036c7474e77','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200008,19,'Y','D','Client','AD_Client_ID','Client/Tenant for this installation.',0,'Y',10,'Y',100,TO_TIMESTAMP('2012-09-03 18:50:46','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-09-03 18:50:46','YYYY-MM-DD HH24:MI:SS'),0,0,'N')
;
-- Sep 3, 2012 6:50:47 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Process_Para_Trl_UU ) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=200029 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID)
;
-- Sep 3, 2012 6:51:14 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Para (IsRange,AD_Element_ID,AD_Process_Para_ID,AD_Process_Para_UU,Help,AD_Process_ID,AD_Reference_ID,IsMandatory,EntityType,Name,ColumnName,Description,FieldLength,IsCentrallyMaintained,SeqNo,IsActive,UpdatedBy,Updated,CreatedBy,Created,AD_Org_ID,AD_Client_ID,IsEncrypted) VALUES ('N',138,200030,'646405c2-cba9-452b-b62f-265d209d1dff','The User identifies a unique user in the system. This could be an internal user or a business partner contact',200008,19,'N','U','User/Contact','AD_User_ID','User within the system - Internal or Business Partner Contact',0,'Y',20,'Y',100,TO_TIMESTAMP('2012-09-03 18:51:13','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-09-03 18:51:13','YYYY-MM-DD HH24:MI:SS'),0,0,'N')
;
-- Sep 3, 2012 6:51:14 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Process_Para_Trl_UU ) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=200030 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID)
;
-- Sep 3, 2012 6:52:17 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Menu (AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,AD_Process_ID,EntityType,IsCentrallyMaintained,Name,Description,"action",AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200012,'N','N','N',200008,'D','Y','Reset Locked Account','Reset Locked Account for User','P','5c6927d6-fb4d-4762-b023-af032f963d74','Y',0,100,TO_TIMESTAMP('2012-09-03 18:52:16','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-09-03 18:52:16','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Sep 3, 2012 6:52:17 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Menu_Trl_UU ) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200012 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID)
;
-- Sep 3, 2012 6:52:17 PM SGT
-- IDEMPIERE-373 Implement User Locking
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', CURRENT_TIMESTAMP, 100, CURRENT_TIMESTAMP, 100,t.AD_Tree_ID, 200012, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200012)
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200002
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=147
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53246
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=487
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200012
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=150
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=495
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=50007
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=362
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200001
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=475
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=366
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=483
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=13, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=368
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=14, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=508
;
-- Sep 3, 2012 6:52:33 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=15, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53348
;
-- Sep 3, 2012 6:53:50 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','Old Password',200027,'D','c9b0a4a7-642f-4256-a77e-e0e41b112b37','Old Password','Y',TO_TIMESTAMP('2012-09-03 18:53:50','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-03 18:53:50','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:53:51 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200027 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 3, 2012 6:54:02 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','New Password',200028,'D','66f34194-4995-488f-8abc-78d382617a76','New Password','Y',TO_TIMESTAMP('2012-09-03 18:54:01','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-03 18:54:01','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:54:02 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200028 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 3, 2012 6:54:13 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','New Password Confirm',200029,'D','b78295fc-eeec-4db7-ac8d-260f14e56de8','New Password Confirm','Y',TO_TIMESTAMP('2012-09-03 18:54:13','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-03 18:54:13','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:54:14 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200029 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 3, 2012 6:55:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','New Password Confirm is Mandatory',200030,'D','b649b8ea-97f5-408a-81bd-12eb0e8ae388','NewPasswordConfirmMandatory','Y',TO_TIMESTAMP('2012-09-03 18:54:59','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-03 18:54:59','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:55:00 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200030 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 3, 2012 6:56:29 PM SGT
-- IDEMPIERE-373 Implement User Locking
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','Password does not match the confirm password',200031,'D','10fdcb04-bc7c-4c30-b149-570231862faf','PasswordNotMatch','Y',TO_TIMESTAMP('2012-09-03 18:56:28','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-09-03 18:56:28','YYYY-MM-DD HH24:MI:SS'))
;
-- Sep 3, 2012 6:56:29 PM SGT
-- IDEMPIERE-373 Implement User Locking
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=200031 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 3, 2012 6:57:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message SET MsgText='Confirm New Password',Updated=TO_TIMESTAMP('2012-09-03 18:57:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200029
;
-- Sep 3, 2012 6:57:52 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200029
;
-- Sep 3, 2012 6:58:08 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message SET MsgText='Confirm New Password is Mandatory',Updated=TO_TIMESTAMP('2012-09-03 18:58:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200030
;
-- Sep 3, 2012 6:58:08 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200030
;
-- Sep 3, 2012 6:58:20 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message SET MsgText='Password does not match the Confirm Password',Updated=TO_TIMESTAMP('2012-09-03 18:58:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200031
;
-- Sep 3, 2012 6:58:20 PM SGT
-- IDEMPIERE-373 Implement User Locking
UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200031
;
UPDATE AD_System
SET LastMigrationScriptApplied='898_IDEMPIERE-373_User_Locking.sql'
WHERE LastMigrationScriptApplied<'898_IDEMPIERE-373_User_Locking.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,90 @@
package org.adempiere.process;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MSysConfig;
import org.compiere.model.MUser;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.Env;
public class ResetLockedAccount extends SvrProcess {
private int p_AD_Client_ID = 0;
private int p_AD_User_ID = 0;
@Override
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (ProcessInfoParameter element : para)
{
String name = element.getParameterName();
if (element.getParameter() == null
&& element.getParameter_To() == null)
;
else if (name.equals("AD_Client_ID"))
p_AD_Client_ID = element.getParameterAsInt();
else if (name.equals("AD_User_ID"))
p_AD_User_ID = element.getParameterAsInt();
else
log.log(Level.INFO, "Unknown Parameter: " + name);
}
}
@Override
protected String doIt() throws Exception
{
if (p_AD_Client_ID == 0)
p_AD_Client_ID = Env.getAD_Client_ID(getCtx());
if (p_AD_User_ID > 0)
{
MUser user = new MUser(getCtx(), p_AD_User_ID, null);
if (!user.isLocked())
throw new AdempiereException("User " + user.getName() + " is not locked");
String sql = "UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=SysDate "
+ " WHERE IsLocked='Y' AND AD_Client_ID = ? "
+ " AND DateAccountLocked IS NOT NULL "
+ " AND AD_User_ID = " + user.getAD_User_ID();
int no = DB.executeUpdate(sql, new Object[] { p_AD_Client_ID }, false, get_TrxName());
if (no < 0)
throw new AdempiereException("Could not unlock user account" + user.toString());
return "@OK@ - The user '" + user.getName() + "' has been unlocked";
}
else
{
int MAX_ACCOUNT_LOCK_MINUTES = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES, 0);
int MAX_INACTIVE_PERIOD = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_INACTIVE_PERIOD_DAY, 0);
String sql = "UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=SysDate "
+ " WHERE IsLocked='Y' AND AD_Client_ID IN (0, ?) "
+ " AND DateAccountLocked IS NOT NULL";
if (DB.isPostgreSQL())
{
if (MAX_ACCOUNT_LOCK_MINUTES > 0)
sql += " AND EXTRACT(MINUTE FROM (now()-DateAccountLocked)) * 24 * 60 > " + MAX_ACCOUNT_LOCK_MINUTES;
if (MAX_INACTIVE_PERIOD > 0)
sql += " AND EXTRACT(DAY FROM (now()-DateLastLogin)) * 24 <= " + MAX_INACTIVE_PERIOD;
}
else
{
if (MAX_ACCOUNT_LOCK_MINUTES > 0)
sql += " AND (SysDate-DateAccountLocked) * 24 * 60 > " + MAX_ACCOUNT_LOCK_MINUTES;
if (MAX_INACTIVE_PERIOD > 0)
sql += " AND (SysDate-DateLastLogin) * 24 <= " + MAX_INACTIVE_PERIOD;
}
int no = DB.executeUpdate(sql, p_AD_Client_ID, get_TrxName());
if (no < 0)
throw new AdempiereException("Could not unlock user account");
return no + " locked account has been reset";
}
}
}

View File

@ -22,7 +22,7 @@ import org.compiere.util.KeyNamePair;
/** Generated Interface for AD_User
* @author Adempiere (generated)
* @version 360LTS.015
* @version Release 3.6.0LTS
*/
public interface I_AD_User
{
@ -31,7 +31,7 @@ public interface I_AD_User
public static final String Table_Name = "AD_User";
/** AD_Table_ID=114 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
public static final int Table_ID = 114;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -88,6 +88,15 @@ public interface I_AD_User
*/
public int getAD_User_ID();
/** Column name AD_User_UU */
public static final String COLUMNNAME_AD_User_UU = "AD_User_UU";
/** Set AD_User_UU */
public void setAD_User_UU (String AD_User_UU);
/** Get AD_User_UU */
public String getAD_User_UU();
/** Column name Birthday */
public static final String COLUMNNAME_Birthday = "Birthday";
@ -114,7 +123,7 @@ public interface I_AD_User
*/
public int getC_BPartner_ID();
public I_C_BPartner getC_BPartner() throws RuntimeException;
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException;
/** Column name C_BPartner_Location_ID */
public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID";
@ -129,7 +138,7 @@ public interface I_AD_User
*/
public int getC_BPartner_Location_ID();
public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException;
public org.compiere.model.I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException;
/** Column name C_Greeting_ID */
public static final String COLUMNNAME_C_Greeting_ID = "C_Greeting_ID";
@ -144,7 +153,7 @@ public interface I_AD_User
*/
public int getC_Greeting_ID();
public I_C_Greeting getC_Greeting() throws RuntimeException;
public org.compiere.model.I_C_Greeting getC_Greeting() throws RuntimeException;
/** Column name C_Job_ID */
public static final String COLUMNNAME_C_Job_ID = "C_Job_ID";
@ -159,7 +168,7 @@ public interface I_AD_User
*/
public int getC_Job_ID();
public I_C_Job getC_Job() throws RuntimeException;
public org.compiere.model.I_C_Job getC_Job() throws RuntimeException;
/** Column name Comments */
public static final String COLUMNNAME_Comments = "Comments";
@ -203,6 +212,33 @@ public interface I_AD_User
*/
public int getCreatedBy();
/** Column name DateAccountLocked */
public static final String COLUMNNAME_DateAccountLocked = "DateAccountLocked";
/** Set Date Account Locked */
public void setDateAccountLocked (Timestamp DateAccountLocked);
/** Get Date Account Locked */
public Timestamp getDateAccountLocked();
/** Column name DateLastLogin */
public static final String COLUMNNAME_DateLastLogin = "DateLastLogin";
/** Set Date Last Login */
public void setDateLastLogin (Timestamp DateLastLogin);
/** Get Date Last Login */
public Timestamp getDateLastLogin();
/** Column name DatePasswordChanged */
public static final String COLUMNNAME_DatePasswordChanged = "DatePasswordChanged";
/** Set Date Password Changed */
public void setDatePasswordChanged (Timestamp DatePasswordChanged);
/** Get Date Password Changed */
public Timestamp getDatePasswordChanged();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
@ -281,6 +317,15 @@ public interface I_AD_User
*/
public Timestamp getEMailVerifyDate();
/** Column name FailedLoginCount */
public static final String COLUMNNAME_FailedLoginCount = "FailedLoginCount";
/** Set Failed Login Count */
public void setFailedLoginCount (int FailedLoginCount);
/** Get Failed Login Count */
public int getFailedLoginCount();
/** Column name Fax */
public static final String COLUMNNAME_Fax = "Fax";
@ -333,6 +378,15 @@ public interface I_AD_User
*/
public boolean isInPayroll();
/** Column name IsLocked */
public static final String COLUMNNAME_IsLocked = "IsLocked";
/** Set Locked */
public void setIsLocked (boolean IsLocked);
/** Get Locked */
public boolean isLocked();
/** Column name IsMenuAutoExpand */
public static final String COLUMNNAME_IsMenuAutoExpand = "IsMenuAutoExpand";
@ -346,6 +400,15 @@ public interface I_AD_User
*/
public String getIsMenuAutoExpand();
/** Column name IsNoPasswordReset */
public static final String COLUMNNAME_IsNoPasswordReset = "IsNoPasswordReset";
/** Set No Password Reset */
public void setIsNoPasswordReset (boolean IsNoPasswordReset);
/** Get No Password Reset */
public boolean isNoPasswordReset();
/** Column name LastContact */
public static final String COLUMNNAME_LastContact = "LastContact";
@ -458,7 +521,7 @@ public interface I_AD_User
/** Get Process Now */
public boolean isProcessing();
/** Column name Salt */
public static final String COLUMNNAME_Salt = "Salt";
@ -470,7 +533,7 @@ public interface I_AD_User
/** Get Salt.
* Random data added to improve password hash effectiveness
*/
public String getSalt();
public String getSalt();
/** Column name Supervisor_ID */
public static final String COLUMNNAME_Supervisor_ID = "Supervisor_ID";
@ -485,7 +548,7 @@ public interface I_AD_User
*/
public int getSupervisor_ID();
public I_AD_User getSupervisor() throws RuntimeException;
public org.compiere.model.I_AD_User getSupervisor() throws RuntimeException;
/** Column name Title */
public static final String COLUMNNAME_Title = "Title";

View File

@ -90,6 +90,10 @@ public class MSysConfig extends X_AD_SysConfig
public static final String ZK_LOGIN_ALLOW_REMEMBER_ME = "ZK_LOGIN_ALLOW_REMEMBER_ME";
public static final String SWING_LOGIN_ALLOW_REMEMBER_ME = "SWING_LOGIN_ALLOW_REMEMBER_ME";
public static final String USER_PASSWORD_HASH = "USER_PASSWORD_HASH";
public static final String USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES = "USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES";
public static final String USER_LOCKING_MAX_LOGIN_ATTEMPT = "USER_LOCKING_MAX_LOGIN_ATTEMPT";
public static final String USER_LOCKING_MAX_INACTIVE_PERIOD_DAY = "USER_LOCKING_MAX_INACTIVE_PERIOD_DAY";
public static final String USER_LOCKING_MAX_PASSWORD_AGE_DAY = "USER_LOCKING_MAX_PASSWORD_AGE_DAY";
public static final String ProductUOMConversionUOMValidate = "ProductUOMConversionUOMValidate";
public static final String ProductUOMConversionRateValidate = "ProductUOMConversionRateValidate";
public static final String SYSTEM_INSERT_CHANGELOG = "SYSTEM_INSERT_CHANGELOG";

View File

@ -24,6 +24,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import java.util.StringTokenizer;
@ -36,7 +37,6 @@ import org.compiere.util.CCache;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg;
import org.compiere.util.Secure;
import org.compiere.util.SecureEngine;
@ -175,7 +175,7 @@ public class MUser extends X_AD_User
}
boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false);
boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
ArrayList<KeyNamePair> clientList = new ArrayList<KeyNamePair>();
// ArrayList<KeyNamePair> clientList = new ArrayList<KeyNamePair>();
ArrayList<Integer> clientsValidated = new ArrayList<Integer>();
MUser retValue = null;
@ -938,6 +938,8 @@ public class MUser extends X_AD_User
boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false);
if (hash_password)
setPassword(getPassword());
setDatePasswordChanged(new Timestamp(new Date().getTime()));
}
return true;

View File

@ -24,14 +24,14 @@ import org.compiere.util.KeyNamePair;
/** Generated Model for AD_User
* @author Adempiere (generated)
* @version 360LTS.015 - $Id$ */
* @version Release 3.6.0LTS - $Id$ */
public class X_AD_User extends PO implements I_AD_User, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 20120418L;
private static final long serialVersionUID = 20120830L;
/** Standard Constructor */
public X_AD_User (Properties ctx, int AD_User_ID, String trxName)
@ -40,10 +40,16 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
/** if (AD_User_ID == 0)
{
setAD_User_ID (0);
setFailedLoginCount (0);
// 0
setIsFullBPAccess (true);
// Y
setIsInPayroll (false);
// N
setIsLocked (false);
// 'N'
setIsNoPasswordReset (false);
// 'N'
setName (null);
setNotificationType (null);
// E
@ -124,6 +130,20 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return ii.intValue();
}
/** Set AD_User_UU.
@param AD_User_UU AD_User_UU */
public void setAD_User_UU (String AD_User_UU)
{
set_Value (COLUMNNAME_AD_User_UU, AD_User_UU);
}
/** Get AD_User_UU.
@return AD_User_UU */
public String getAD_User_UU ()
{
return (String)get_Value(COLUMNNAME_AD_User_UU);
}
/** Set Birthday.
@param Birthday
Birthday or Anniversary day
@ -141,9 +161,9 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return (Timestamp)get_Value(COLUMNNAME_Birthday);
}
public I_C_BPartner getC_BPartner() throws RuntimeException
public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
{
return (I_C_BPartner)MTable.get(getCtx(), I_C_BPartner.Table_Name)
return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
.getPO(getC_BPartner_ID(), get_TrxName()); }
/** Set Business Partner .
@ -169,9 +189,9 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return ii.intValue();
}
public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException
public org.compiere.model.I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException
{
return (I_C_BPartner_Location)MTable.get(getCtx(), I_C_BPartner_Location.Table_Name)
return (org.compiere.model.I_C_BPartner_Location)MTable.get(getCtx(), org.compiere.model.I_C_BPartner_Location.Table_Name)
.getPO(getC_BPartner_Location_ID(), get_TrxName()); }
/** Set Partner Location.
@ -197,9 +217,9 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return ii.intValue();
}
public I_C_Greeting getC_Greeting() throws RuntimeException
public org.compiere.model.I_C_Greeting getC_Greeting() throws RuntimeException
{
return (I_C_Greeting)MTable.get(getCtx(), I_C_Greeting.Table_Name)
return (org.compiere.model.I_C_Greeting)MTable.get(getCtx(), org.compiere.model.I_C_Greeting.Table_Name)
.getPO(getC_Greeting_ID(), get_TrxName()); }
/** Set Greeting.
@ -225,9 +245,9 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return ii.intValue();
}
public I_C_Job getC_Job() throws RuntimeException
public org.compiere.model.I_C_Job getC_Job() throws RuntimeException
{
return (I_C_Job)MTable.get(getCtx(), I_C_Job.Table_Name)
return (org.compiere.model.I_C_Job)MTable.get(getCtx(), org.compiere.model.I_C_Job.Table_Name)
.getPO(getC_Job_ID(), get_TrxName()); }
/** Set Position.
@ -298,6 +318,48 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return (String)get_Value(COLUMNNAME_ConnectionProfile);
}
/** Set Date Account Locked.
@param DateAccountLocked Date Account Locked */
public void setDateAccountLocked (Timestamp DateAccountLocked)
{
set_Value (COLUMNNAME_DateAccountLocked, DateAccountLocked);
}
/** Get Date Account Locked.
@return Date Account Locked */
public Timestamp getDateAccountLocked ()
{
return (Timestamp)get_Value(COLUMNNAME_DateAccountLocked);
}
/** Set Date Last Login.
@param DateLastLogin Date Last Login */
public void setDateLastLogin (Timestamp DateLastLogin)
{
set_Value (COLUMNNAME_DateLastLogin, DateLastLogin);
}
/** Get Date Last Login.
@return Date Last Login */
public Timestamp getDateLastLogin ()
{
return (Timestamp)get_Value(COLUMNNAME_DateLastLogin);
}
/** Set Date Password Changed.
@param DatePasswordChanged Date Password Changed */
public void setDatePasswordChanged (Timestamp DatePasswordChanged)
{
set_Value (COLUMNNAME_DatePasswordChanged, DatePasswordChanged);
}
/** Get Date Password Changed.
@return Date Password Changed */
public Timestamp getDatePasswordChanged ()
{
return (Timestamp)get_Value(COLUMNNAME_DatePasswordChanged);
}
/** Set Description.
@param Description
Optional short description of the record
@ -400,6 +462,23 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return (Timestamp)get_Value(COLUMNNAME_EMailVerifyDate);
}
/** Set Failed Login Count.
@param FailedLoginCount Failed Login Count */
public void setFailedLoginCount (int FailedLoginCount)
{
set_Value (COLUMNNAME_FailedLoginCount, Integer.valueOf(FailedLoginCount));
}
/** Get Failed Login Count.
@return Failed Login Count */
public int getFailedLoginCount ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_FailedLoginCount);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Fax.
@param Fax
Facsimile number
@ -465,6 +544,27 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return false;
}
/** Set Locked.
@param IsLocked Locked */
public void setIsLocked (boolean IsLocked)
{
set_Value (COLUMNNAME_IsLocked, Boolean.valueOf(IsLocked));
}
/** Get Locked.
@return Locked */
public boolean isLocked ()
{
Object oo = get_Value(COLUMNNAME_IsLocked);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** IsMenuAutoExpand AD_Reference_ID=319 */
public static final int ISMENUAUTOEXPAND_AD_Reference_ID=319;
/** Yes = Y */
@ -489,6 +589,27 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
return (String)get_Value(COLUMNNAME_IsMenuAutoExpand);
}
/** Set No Password Reset.
@param IsNoPasswordReset No Password Reset */
public void setIsNoPasswordReset (boolean IsNoPasswordReset)
{
set_Value (COLUMNNAME_IsNoPasswordReset, Boolean.valueOf(IsNoPasswordReset));
}
/** Get No Password Reset.
@return No Password Reset */
public boolean isNoPasswordReset ()
{
Object oo = get_Value(COLUMNNAME_IsNoPasswordReset);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Last Contact.
@param LastContact
Date this individual was last contacted
@ -664,29 +785,27 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent
}
return false;
}
/**
* Set Salt.
*
* @param Salt
* Random data added to improve password hash effectiveness
*/
public void setSalt(String Salt) {
set_ValueNoCheck(COLUMNNAME_Salt, Salt);
/** Set Salt.
@param Salt
Random data added to improve password hash effectiveness
*/
public void setSalt (String Salt)
{
set_ValueNoCheck (COLUMNNAME_Salt, Salt);
}
/**
* Get Salt.
*
* @return Random data added to improve password hash effectiveness
*/
public String getSalt() {
return (String) get_Value(COLUMNNAME_Salt);
/** Get Salt.
@return Random data added to improve password hash effectiveness
*/
public String getSalt ()
{
return (String)get_Value(COLUMNNAME_Salt);
}
public I_AD_User getSupervisor() throws RuntimeException
public org.compiere.model.I_AD_User getSupervisor() throws RuntimeException
{
return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name)
return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
.getPO(getSupervisor_ID(), get_TrxName()); }
/** Set Supervisor.

View File

@ -21,7 +21,9 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
@ -58,7 +60,18 @@ import org.compiere.model.Query;
* @version $Id: Login.java,v 1.6 2006/10/02 05:19:06 jjanke Exp $
*/
public class Login
{
{
private String loginErrMsg;
private boolean isPasswordExpired;
public String getLoginErrMsg() {
return loginErrMsg;
}
public boolean isPasswordExpired() {
return isPasswordExpired;
}
/**
* Test Init - Set Environment for tests
* @param isClient client session
@ -470,7 +483,10 @@ public class Login
public KeyNamePair[] getClients (KeyNamePair role)
{
if (role == null)
throw new IllegalArgumentException("Role missing");
throw new IllegalArgumentException("Role missing");
loginErrMsg = null;
isPasswordExpired = false;
// s_log.fine("loadClients - Role: " + role.toStringX());
@ -1286,6 +1302,9 @@ public class Login
log.warning("No Apps Password");
return null;
}
loginErrMsg = null;
isPasswordExpired = false;
if (system.isLDAP())
{
@ -1326,6 +1345,48 @@ public class Login
log.saveError("UserPwdError", app_user, false);
return null;
}
int MAX_ACCOUNT_LOCK_MINUTES = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES, 0);
int MAX_INACTIVE_PERIOD_DAY = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_INACTIVE_PERIOD_DAY, 0);
int MAX_PASSWORD_AGE = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_PASSWORD_AGE_DAY, 0);
long now = new Date().getTime();
for (MUser user : users) {
if (MAX_ACCOUNT_LOCK_MINUTES > 0 && user.isLocked() && user.getDateAccountLocked() != null)
{
long minutes = (now - user.getDateAccountLocked().getTime()) / (1000 * 60);
if (minutes > MAX_ACCOUNT_LOCK_MINUTES)
{
boolean inactive = false;
if (MAX_INACTIVE_PERIOD_DAY > 0 && user.getDateLastLogin() != null)
{
long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24);
if (days > MAX_INACTIVE_PERIOD_DAY)
inactive = true;
}
if (!inactive)
{
user.setIsLocked(false);
user.setDateAccountLocked(null);
user.setFailedLoginCount(0);
if (!user.save())
log.severe("Failed to unlock user account");
}
}
}
if (MAX_INACTIVE_PERIOD_DAY > 0 && !user.isLocked() && user.getDateLastLogin() != null)
{
long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24);
if (days > MAX_INACTIVE_PERIOD_DAY)
{
user.setIsLocked(true);
user.setDateAccountLocked(new Timestamp(new Date().getTime()));
if (!user.save())
log.severe("Failed to lock user account");
}
}
}
for (MUser user : users) {
if (clientsValidated.contains(user.getAD_Client_ID())) {
@ -1347,7 +1408,20 @@ public class Login
// password not hashed
valid = user.getPassword().equals(app_pwd);
}
if (valid ) {
if (valid ) {
if (user.isLocked())
continue;
if (MAX_PASSWORD_AGE > 0 && !user.isNoPasswordReset())
{
if (user.getDatePasswordChanged() == null)
user.setDatePasswordChanged(user.getUpdated());
long days = (now - user.getDatePasswordChanged().getTime()) / (1000 * 60 * 60 * 24);
if (days > MAX_PASSWORD_AGE)
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")
.append(" INNER JOIN AD_User u on (ur.AD_User_ID=u.AD_User_ID)")
@ -1397,7 +1471,50 @@ public class Login
retValue = new KeyNamePair[clientList.size()];
clientList.toArray(retValue);
log.fine("User=" + app_user + " - roles #" + retValue.length);
for (MUser user : users)
{
user.setFailedLoginCount(0);
user.setDateLastLogin(new Timestamp(new Date().getTime()));
if (!user.save())
log.severe("Failed to update user record with date last login");
}
}
else
{
for (MUser user : users)
{
if (user.isLocked())
{
loginErrMsg = "User account '" + app_user + "' is locked, please contact the system administrator";
break;
}
int count = user.getFailedLoginCount() + 1;
boolean reachMaxAttempt = false;
int MAX_LOGIN_ATTEMPT = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_LOGIN_ATTEMPT, 0);
if (MAX_LOGIN_ATTEMPT > 0 && count >= MAX_LOGIN_ATTEMPT)
{
loginErrMsg = "Reached the maximum number of login attempts, user account '" + app_user + "' is locked";
reachMaxAttempt = true;
}
else if (MAX_LOGIN_ATTEMPT > 0)
{
loginErrMsg = "Invaid User ID or Password (Login Attempts: " + count + " / " + MAX_LOGIN_ATTEMPT + ")";
reachMaxAttempt = false;
}
else
{
reachMaxAttempt = false;
}
user.setFailedLoginCount(count);
user.setIsLocked(reachMaxAttempt);
user.setDateAccountLocked(user.isLocked() ? new Timestamp(new Date().getTime()) : null);
if (!user.save())
log.severe("Failed to update user record with increase failed login count");
}
}
return retValue;
}
@ -1482,6 +1599,9 @@ public class Login
throw new UnsupportedOperationException("Missing Context #AD_User_ID");
}
loginErrMsg = null;
isPasswordExpired = false;
int AD_User_ID = Env.getContextAsInt(m_ctx, "#AD_User_ID");
KeyNamePair[] retValue = null;
ArrayList<KeyNamePair> clientList = new ArrayList<KeyNamePair>();

View File

@ -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.Util;
/**
* Application Login Window
@ -110,6 +111,14 @@ public final class ALogin extends CDialog
/** Logger */
private static CLogger log = CLogger.getCLogger(ALogin.class);
private static final int TAB_CONNECTION = 0;
private static final int TAB_DEFAULTS = 1;
private static final int TAB_CHANGE_PASSWORD = 2;
private static final int NOT_CONNECTED = -1;
private static final int CONNECTED_OK = 0;
private static final int CONNECTED_OK_WITH_PASSWORD_EXPIRED = 1;
private CPanel mainPanel = new CPanel(new BorderLayout());
private CTabbedPane loginTabPane = new CTabbedPane();
private CPanel connectionPanel = new CPanel();
@ -145,6 +154,17 @@ public final class ALogin extends CDialog
private BorderLayout southLayout = new BorderLayout();
private StatusBar statusBar = new StatusBar();
private ConfirmPanel confirmPanel = new ConfirmPanel(true, false, false, false, false, false, false);
// IDEMPIERE-373 Implement User Locking
private CPanel changePasswordPanel = new CPanel();
private GridBagLayout changePasswordPanelLayout = new GridBagLayout();
private CLabel lblOldPassword = new CLabel();
private CLabel lblNewPassword = new CLabel();
private CLabel lblRetypeNewPassword = new CLabel();
private JPasswordField txtOldPassword = new JPasswordField();
private JPasswordField txtNewPassword = new JPasswordField();
private JPasswordField txtRetypeNewPassword = new JPasswordField();
//
/** Server Connection */
private CConnection m_cc;
@ -158,7 +178,7 @@ public final class ALogin extends CDialog
/** Combo Active */
private boolean m_okPressed = false;
/** Connection OK */
private boolean m_connectionOK = false;
private int m_connectionOK = -1;
/** Window No */
private int m_WindowNo;
/** Context */
@ -334,6 +354,43 @@ public final class ALogin extends CDialog
// @Trifon - end
//
loginTabPane.add(defaultPanel, res.getString("Defaults"));
// IDEMPIERE-373 Implement User Locking
txtOldPassword.setName("txtOldPassword");
lblOldPassword.setRequestFocusEnabled(false);
lblOldPassword.setLabelFor(txtOldPassword);
lblOldPassword.setHorizontalAlignment(SwingConstants.RIGHT);
lblOldPassword.setText(Msg.getMsg(m_ctx, "Old Password"));
txtNewPassword.setName("txtNewPassword");
lblNewPassword.setRequestFocusEnabled(false);
lblNewPassword.setLabelFor(txtNewPassword);
lblNewPassword.setHorizontalAlignment(SwingConstants.RIGHT);
lblNewPassword.setText(Msg.getMsg(m_ctx, "New Password"));
txtRetypeNewPassword.setName("txtRetypeNewPassword");
lblRetypeNewPassword.setRequestFocusEnabled(false);
lblRetypeNewPassword.setLabelFor(txtRetypeNewPassword);
lblRetypeNewPassword.setHorizontalAlignment(SwingConstants.RIGHT);
lblRetypeNewPassword.setText(Msg.getMsg(m_ctx, "New Password Confirm"));
changePasswordPanel.setLayout(changePasswordPanelLayout);
changePasswordPanel.add(lblOldPassword, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
changePasswordPanel.add(txtOldPassword, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
changePasswordPanel.add(lblNewPassword, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
changePasswordPanel.add(txtNewPassword, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
changePasswordPanel.add(lblRetypeNewPassword, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
,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"));
loginTabPane.setEnabledAt(TAB_CHANGE_PASSWORD, false);
//
// Help
/*
@ -389,9 +446,9 @@ public final class ALogin extends CDialog
{
connectionOK ();
defaultsOK ();
if (m_connectionOK) // simulate
if (m_connectionOK >= 0) // simulate
m_okPressed = true;
return m_connectionOK;
return m_connectionOK >= 0;
}
return false;
} // initLogin
@ -431,7 +488,7 @@ public final class ALogin extends CDialog
*/
private void validateConnection()
{
m_connectionOK = false;
m_connectionOK = -1;
validateAppServer();
//make sure connecting to new database
@ -447,7 +504,7 @@ public final class ALogin extends CDialog
*/
private void appExit()
{
m_connectionOK = false;
m_connectionOK = -1;
dispose();
} // appExit_actionPerformed
@ -458,7 +515,7 @@ public final class ALogin extends CDialog
*/
public boolean isConnected()
{
return m_connectionOK;
return m_connectionOK >= -1;
} // isConnected
/**
@ -478,11 +535,17 @@ public final class ALogin extends CDialog
{
if (e.getActionCommand().equals(ConfirmPanel.A_OK))
{
if (loginTabPane.getSelectedIndex() == 0) {
confirmPanel.getOKButton().setEnabled(false);
if (loginTabPane.getSelectedIndex() == TAB_CONNECTION) {
connectionOK(); // first ok
printerField.refresh();
}
else
else if (loginTabPane.getSelectedIndex() == TAB_CHANGE_PASSWORD)
{
validateChangePassword();
}
else
{
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
m_okPressed = true;
@ -491,6 +554,8 @@ public final class ALogin extends CDialog
m_okPressed = false;
setCursor(Cursor.getDefaultCursor());
}
confirmPanel.getOKButton().setEnabled(true);
}
else if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL))
appExit();
@ -523,7 +588,7 @@ public final class ALogin extends CDialog
m_connectionOK = tryConnection();
if (m_connectionOK)
if (m_connectionOK >= 0)
{
// Verify Language & Load Msg
Language l = Language.getLoginLanguage();
@ -542,14 +607,70 @@ public final class ALogin extends CDialog
}
// Set Defaults
printerField.setValue(Ini.getProperty(Ini.P_PRINTER));
// Change Tab to Default
loginTabPane.setSelectedIndex(1);
if (m_connectionOK == CONNECTED_OK_WITH_PASSWORD_EXPIRED)
loginTabPane.setSelectedIndex(TAB_CHANGE_PASSWORD);
else // Change Tab to Default
loginTabPane.setSelectedIndex(TAB_DEFAULTS);
}
confirmPanel.getOKButton().setEnabled(true);
setCursor(Cursor.getDefaultCursor());
} // connectionOK
private void validateChangePassword()
{
String oldPassword = new String(txtOldPassword.getPassword());
String newPassword = new String(txtNewPassword.getPassword());
String retypeNewPassword = new String(txtRetypeNewPassword.getPassword());
if (Util.isEmpty(oldPassword))
{
statusBar.setStatusLine(Msg.getMsg(m_ctx, "@OldPasswordMandatory@"), true);
return;
}
if (Util.isEmpty(retypeNewPassword))
{
statusBar.setStatusLine(Msg.getMsg(m_ctx, "@NewPasswordConfirmMandatory@"), true);
return;
}
if (!newPassword.equals(retypeNewPassword))
{
statusBar.setStatusLine(Msg.getMsg(m_ctx, "@PasswordNotMatch@"), true);
return;
}
String m_userPassword = new String(m_pwd);
if (!oldPassword.equals(m_userPassword))
{
statusBar.setStatusLine(Msg.getMsg(m_ctx, "@OldPasswordNoMatch@"), true);
return;
}
for (int index = 0; index < clientCombo.getItemCount(); index++)
{
KeyNamePair clientKNPair = (KeyNamePair) clientCombo.getItemAt(index);
int clientId = clientKNPair.getKey();
Env.setContext(m_ctx, "#AD_Client_ID", clientId);
MUser user = MUser.get(m_ctx, m_user);
if (user == null)
{
log.severe("Could not find user '" + m_user + "'");
statusBar.setStatusLine("Could not find user '" + m_user + "'", true);
return;
}
user.setPassword(newPassword);
user.saveEx();
}
passwordField.setText(newPassword);
m_pwd = newPassword.toCharArray();
m_connectionOK = CONNECTED_OK;
loginTabPane.setSelectedIndex(TAB_DEFAULTS);
}
/**
* Change of tab <->
@ -557,19 +678,24 @@ public final class ALogin extends CDialog
*/
public void stateChanged(ChangeEvent e)
{
if (loginTabPane.getSelectedIndex() == 2) // allow access to help
return;
// if (loginTabPane.getSelectedIndex() == 3) // allow access to help
// return;
if (!(String.valueOf(passwordField.getPassword()).equals(String.valueOf(m_pwd))
&& userTextField.getText().equals(m_user)))
m_connectionOK = false;
m_connectionOK = -1;
//
if (m_connectionOK)
if (m_connectionOK == CONNECTED_OK_WITH_PASSWORD_EXPIRED)
{
statusBar.setStatusLine(txt_PasswordExpired);
loginTabPane.setSelectedIndex(TAB_CHANGE_PASSWORD);
}
else if (m_connectionOK == CONNECTED_OK)
statusBar.setStatusLine(txt_LoggedIn);
else
{
statusBar.setStatusLine(txt_NotConnected, true);
loginTabPane.setSelectedIndex(0);
loginTabPane.setSelectedIndex(TAB_CONNECTION);
}
confirmPanel.getOKButton().requestFocus();
} // loginTabPane
@ -611,9 +737,9 @@ public final class ALogin extends CDialog
checkVersion(); // exits if conflict
// Close - we are done
if (m_connectionOK)
if (m_connectionOK >= 0)
this.dispose();
return m_connectionOK;
return m_connectionOK >= 0;
} // defaultsOK
@ -622,8 +748,8 @@ public final class ALogin extends CDialog
* - Get Connection
* - Compare User info
* @return true if connected
*/
private boolean tryConnection()
*/
private int tryConnection()
{
m_user = userTextField.getText();
m_pwd = passwordField.getPassword();
@ -636,7 +762,7 @@ public final class ALogin extends CDialog
{
statusBar.setStatusLine(txt_NoDatabase, true);
hostField.setBackground(AdempierePLAF.getFieldBackground_Error());
return false;
return NOT_CONNECTED;
}
// Reference check
@ -653,10 +779,15 @@ public final class ALogin extends CDialog
clients = m_login.getClients(m_user, new String(m_pwd));
if (clients == null || clients.length == 0)
{
statusBar.setStatusLine(txt_UserPwdError, true);
String loginErrMsg = m_login.getLoginErrMsg();
if (loginErrMsg != null && loginErrMsg.length() > 0)
statusBar.setStatusLine(loginErrMsg, true);
else
statusBar.setStatusLine(txt_UserPwdError, true);
userTextField.setBackground(AdempierePLAF.getFieldBackground_Error());
passwordField.setBackground(AdempierePLAF.getFieldBackground_Error());
return false;
return NOT_CONNECTED;
}
}
catch (Throwable e)
@ -666,17 +797,16 @@ public final class ALogin extends CDialog
statusBar.setStatusLine(txt_UserPwdError, true);
userTextField.setBackground(AdempierePLAF.getFieldBackground_Error());
passwordField.setBackground(AdempierePLAF.getFieldBackground_Error());
return false;
return NOT_CONNECTED;
}
else
{
log.severe(CLogger.getRootCause(e).getLocalizedMessage());
statusBar.setStatusLine(CLogger.getRootCause(e).getLocalizedMessage(), true);
return false;
return NOT_CONNECTED;
}
}
// Delete existing role items
m_comboActive = true;
if (clientCombo.getItemCount() > 0)
@ -717,13 +847,21 @@ public final class ALogin extends CDialog
passwordField.setBackground(AdempierePLAF.getFieldBackground_Normal());
//
this.setTitle(hostField.getDisplay());
statusBar.setStatusLine(txt_LoggedIn);
m_comboActive = false;
clientComboChanged();
return true;
if (m_login.isPasswordExpired())
{
statusBar.setStatusLine(txt_PasswordExpired);
return CONNECTED_OK_WITH_PASSWORD_EXPIRED;
}
else
{
statusBar.setStatusLine(txt_LoggedIn);
return CONNECTED_OK;
}
} // tryConnection
/**
* Client changed - fill Role List
*/
@ -927,7 +1065,8 @@ public final class ALogin extends CDialog
*/
private String // txt_Connected,
txt_NotConnected, txt_NoDatabase,
txt_UserPwdError, txt_RoleError, txt_LoggedIn;
txt_UserPwdError, txt_RoleError, txt_LoggedIn,
txt_PasswordExpired;
/**
* Change Language
@ -970,6 +1109,7 @@ public final class ALogin extends CDialog
txt_UserPwdError = res.getString("UserPwdError");
txt_RoleError = res.getString("RoleNotFound");
txt_LoggedIn = res.getString("Authorized");
txt_PasswordExpired = res.getString("PasswordExpired");
//
loginTabPane.setTitleAt(0, res.getString("Connection"));
if (loginTabPane.getTabCount() > 1)
@ -981,11 +1121,16 @@ public final class ALogin extends CDialog
dateField.setFormat();
dateField.setValue(new Timestamp(System.currentTimeMillis()));
//
if (m_connectionOK)
if (m_connectionOK == CONNECTED_OK)
{
this.setTitle(hostField.getDisplay());
statusBar.setStatusLine(txt_LoggedIn);
}
else if (m_connectionOK == CONNECTED_OK_WITH_PASSWORD_EXPIRED)
{
this.setTitle(hostField.getDisplay());
statusBar.setStatusLine(txt_PasswordExpired);
}
else
{
this.setTitle(res.getString("Login"));

View File

@ -0,0 +1,231 @@
package org.adempiere.webui.panel;
import java.util.Properties;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.webui.AdempiereIdGenerator;
import org.adempiere.webui.LayoutUtils;
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.MUser;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg;
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;
public class ChangePasswordPanel extends Window implements EventListener<Event>
{
/**
*
*/
private static final long serialVersionUID = 5323925843783103350L;
private static CLogger logger = CLogger.getCLogger(ChangePasswordPanel.class);
private LoginWindow wndLogin;
/** Context */
private Properties m_ctx;
/** Username */
private String m_userName;
/** Password */
private String m_userPassword;
private KeyNamePair[] m_clientKNPairs;
private boolean m_show = true;
private Label lblOldPassword;
private Label lblNewPassword;
private Label lblRetypeNewPassword;
private Textbox txtOldPassword;
private Textbox txtNewPassword;
private Textbox txtRetypeNewPassword;
public ChangePasswordPanel(Properties ctx, LoginWindow loginWindow, String userName, String userPassword, boolean show, KeyNamePair[] clientsKNPairs)
{
this.wndLogin = loginWindow;
m_ctx = ctx;
m_userName = userName;
m_userPassword = userPassword;
m_show = show;
m_clientKNPairs = clientsKNPairs;
initComponents();
init();
this.setId("changePasswordPanel");
}
private void init()
{
Div div = new Div();
div.setSclass(ITheme.LOGIN_BOX_HEADER_CLASS);
Label label = new Label("Login");
label.setSclass(ITheme.LOGIN_BOX_HEADER_TXT_CLASS);
div.appendChild(label);
this.appendChild(div);
Table table = new Table();
table.setId("grdChangePassword");
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);
tr = new Tr();
tr.setId("rowUser");
table.appendChild(tr);
td = new Td();
tr.appendChild(td);
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
td.appendChild(lblOldPassword);
td = new Td();
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
tr.appendChild(td);
td.appendChild(txtOldPassword);
tr = new Tr();
tr.setId("rowNewPassword");
table.appendChild(tr);
td = new Td();
tr.appendChild(td);
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
td.appendChild(lblNewPassword);
td = new Td();
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
tr.appendChild(td);
td.appendChild(txtNewPassword);
tr = new Tr();
tr.setId("rowRetypeNewPassword");
table.appendChild(tr);
td = new Td();
tr.appendChild(td);
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
td.appendChild(lblRetypeNewPassword);
td = new Td();
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
tr.appendChild(td);
td.appendChild(txtRetypeNewPassword);
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()
{
lblOldPassword = new Label();
lblOldPassword.setId("lblOldPassword");
lblOldPassword.setValue(Msg.getMsg(m_ctx, "Old Password"));
lblNewPassword = new Label();
lblNewPassword.setId("lblNewPassword");
lblNewPassword.setValue(Msg.getMsg(m_ctx, "New Password"));
lblRetypeNewPassword = new Label();
lblRetypeNewPassword.setId("lblRetypeNewPassword");
lblRetypeNewPassword.setValue(Msg.getMsg(m_ctx, "New Password Confirm"));
txtOldPassword = new Textbox();
txtOldPassword.setId("txtOldPassword");
txtOldPassword.setType("password");
txtOldPassword.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtOldPassword.getId());
txtOldPassword.setCols(25);
txtOldPassword.setWidth("220px");
txtNewPassword = new Textbox();
txtNewPassword.setId("txtNewPassword");
txtNewPassword.setType("password");
txtNewPassword.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtNewPassword.getId());
txtNewPassword.setCols(25);
txtNewPassword.setWidth("220px");
txtRetypeNewPassword = new Textbox();
txtRetypeNewPassword.setId("txtRetypeNewPassword");
txtRetypeNewPassword.setType("password");
txtRetypeNewPassword.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + txtNewPassword.getId());
txtRetypeNewPassword.setCols(25);
txtRetypeNewPassword.setWidth("220px");
}
public void onEvent(Event event)
{
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
{
validateChangePassword();
}
else if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
{
SessionManager.logoutSession();
wndLogin.loginCancelled();
}
}
public void validateChangePassword()
{
String oldPassword = txtOldPassword.getValue();
String newPassword = txtNewPassword.getValue();
String retypeNewPassword = txtRetypeNewPassword.getValue();
if (Util.isEmpty(oldPassword))
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "@OldPasswordMandatory@"));
if (Util.isEmpty(retypeNewPassword))
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "@NewPasswordConfirmMandatory@"));
if (!newPassword.equals(retypeNewPassword))
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "@PasswordNotMatch@"));
if (!oldPassword.equals(m_userPassword))
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "@OldPasswordNoMatch@"));
for (KeyNamePair clientKNPair : m_clientKNPairs)
{
int clientId = clientKNPair.getKey();
Env.setContext(m_ctx, "#AD_Client_ID", clientId);
MUser user = MUser.get(m_ctx, m_userName);
if (user == null)
{
logger.severe("Could not find user '" + m_userName + "'");
throw new AdempiereException("Could not find user");
}
user.setPassword(newPassword);
user.saveEx();
}
wndLogin.loginOk(m_userName, m_show, m_clientKNPairs);
}
}

View File

@ -91,7 +91,7 @@ import org.zkoss.zul.Image;
* @author <a href="mailto:sendy.yagambrum@posterita.org">Sendy Yagambrum</a>
* @date July 18, 2007
*/
public class LoginPanel extends Window implements EventListener
public class LoginPanel extends Window implements EventListener<Event>
{
/**
*
@ -229,7 +229,7 @@ public class LoginPanel extends Window implements EventListener
div.appendChild(pnlButtons);
this.appendChild(div);
txtUserId.addEventListener(TokenEvent.ON_USER_TOKEN, new EventListener() {
txtUserId.addEventListener(TokenEvent.ON_USER_TOKEN, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
@ -480,8 +480,13 @@ public class LoginPanel extends Window implements EventListener
KeyNamePair clientsKNPairs[] = login.getClients(userId, userPassword);
if (clientsKNPairs == null || clientsKNPairs.length == 0)
throw new WrongValueException("User Id or Password invalid!!!");
{
String loginErrMsg = login.getLoginErrMsg();
if (loginErrMsg != null && loginErrMsg.length() > 0)
throw new WrongValueException(loginErrMsg);
else
throw new WrongValueException("User Id or Password invalid!!!");
}
else
{
String langName = null;
@ -492,7 +497,10 @@ public class LoginPanel extends Window implements EventListener
Language language = findLanguage(langName);
Env.setContext(ctx, UserPreference.LANGUAGE_NAME, language.getName()); // Elaine 2009/02/06
wndLogin.loginOk(userId, chkSelectRole.isChecked(), clientsKNPairs);
if (login.isPasswordExpired())
wndLogin.changePassword(userId, userPassword, chkSelectRole.isChecked(), clientsKNPairs);
else
wndLogin.loginOk(userId, chkSelectRole.isChecked(), clientsKNPairs);
Locale locale = language.getLocale();
currSess.setAttribute(Attributes.PREFERRED_LOCALE, locale);

View File

@ -28,6 +28,7 @@ import java.util.Properties;
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.RolePanel;
import org.compiere.model.MSysConfig;
@ -59,6 +60,7 @@ public class LoginWindow extends FWindow implements EventListener
private IWebClient app;
private Properties ctx;
private LoginPanel pnlLogin;
private ChangePasswordPanel pnlChangePassword;
private RolePanel pnlRole;
public LoginWindow(IWebClient app)
@ -88,6 +90,13 @@ public class LoginWindow extends FWindow implements EventListener
this.getChildren().clear();
this.appendChild(pnlRole);
}
public void changePassword(String userName, String userPassword, boolean show, KeyNamePair[] clientsKNPairs)
{
pnlChangePassword = new ChangePasswordPanel(ctx, this, userName, userPassword, show, clientsKNPairs);
this.getChildren().clear();
this.appendChild(pnlChangePassword);
}
public void loginCompleted()
{

View File

@ -66,7 +66,9 @@ public final class ALoginRes extends ListResourceBundle
{ "Cancel", "&Cancel" },
{ "VersionConflict", "Version Conflict:" },
{ "VersionInfo", "Server <> Client" },
{ "PleaseUpgrade", "Please download new Version from Server" }
{ "PleaseUpgrade", "Please download new Version from Server" },
{ "ChangePassword", "Change Password" },
{ "PasswordExpired", "Password Expired" }
};
/**