IDEMPIERE-4268 Web Services : Read miss cross-tenant check (#470)
Fix cross-tenant problem about forcing to change a password expired in a multi-tenant environment
This commit is contained in:
parent
a9a2aeeeed
commit
1ca179f121
|
@ -37,6 +37,7 @@ import org.compiere.model.MPasswordHistory;
|
||||||
import org.compiere.model.MPasswordRule;
|
import org.compiere.model.MPasswordRule;
|
||||||
import org.compiere.model.MSysConfig;
|
import org.compiere.model.MSysConfig;
|
||||||
import org.compiere.model.MUser;
|
import org.compiere.model.MUser;
|
||||||
|
import org.compiere.model.PO;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
|
@ -356,7 +357,12 @@ public class ChangePasswordPanel extends Window implements EventListener<Event>
|
||||||
user.setIsExpired(false);
|
user.setIsExpired(false);
|
||||||
user.setSecurityQuestion(securityQuestion);
|
user.setSecurityQuestion(securityQuestion);
|
||||||
user.setAnswer(answer);
|
user.setAnswer(answer);
|
||||||
user.saveEx(trx.getTrxName());
|
try {
|
||||||
|
PO.setCrossTenantSafe();
|
||||||
|
user.saveEx(trx.getTrxName());
|
||||||
|
} finally {
|
||||||
|
PO.clearCrossTenantSafe();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trx.commit();
|
trx.commit();
|
||||||
|
|
Loading…
Reference in New Issue