IDEMPIERE-4804 Message in Reset Password Panel is misleading (#702)
This commit is contained in:
parent
b928043646
commit
b914083d31
|
@ -0,0 +1,11 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-4804 Message in Reset Password Panel is misleading
|
||||||
|
-- May 29, 2021, 1:51:27 PM CEST
|
||||||
|
UPDATE AD_Message SET MsgText='The new password is now valid in: {0}',Updated=TO_DATE('2021-05-29 13:51:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200076
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('202105291354_IDEMPIERE-4804.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
-- IDEMPIERE-4804 Message in Reset Password Panel is misleading
|
||||||
|
-- May 29, 2021, 1:51:27 PM CEST
|
||||||
|
UPDATE AD_Message SET MsgText='The new password is now valid in: {0}',Updated=TO_TIMESTAMP('2021-05-29 13:51:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200076
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('202105291354_IDEMPIERE-4804.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -334,6 +334,7 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
||||||
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "NewPasswordMustDiffer"));
|
throw new IllegalArgumentException(Msg.getMsg(m_ctx, "NewPasswordMustDiffer"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StringBuilder tenantsChanged = new StringBuilder();
|
||||||
Trx trx = null;
|
Trx trx = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -360,6 +361,9 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
||||||
try {
|
try {
|
||||||
PO.setCrossTenantSafe();
|
PO.setCrossTenantSafe();
|
||||||
user.saveEx(trx.getTrxName());
|
user.saveEx(trx.getTrxName());
|
||||||
|
if (tenantsChanged.length() > 0)
|
||||||
|
tenantsChanged.append(", ");
|
||||||
|
tenantsChanged.append(clientKNPair.getName());
|
||||||
} finally {
|
} finally {
|
||||||
PO.clearCrossTenantSafe();
|
PO.clearCrossTenantSafe();
|
||||||
}
|
}
|
||||||
|
@ -379,7 +383,7 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
||||||
trx.close();
|
trx.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
String msg = Msg.getMsg(m_ctx, "NewPasswordValidForAllTenants");
|
String msg = Msg.getMsg(m_ctx, "NewPasswordValidForAllTenants", new Object[] {tenantsChanged});
|
||||||
Messagebox.showDialog(msg, AEnv.getDialogHeader(Env.getCtx(), 0), Messagebox.OK, Messagebox.INFORMATION, new Callback<Integer>() {
|
Messagebox.showDialog(msg, AEnv.getDialogHeader(Env.getCtx(), 0), Messagebox.OK, Messagebox.INFORMATION, new Callback<Integer>() {
|
||||||
@Override
|
@Override
|
||||||
public void onCallback(Integer result) {
|
public void onCallback(Integer result) {
|
||||||
|
|
Loading…
Reference in New Issue