From f612641a5c15869ac957d68cbcf87929616fade7 Mon Sep 17 00:00:00 2001
From: Rafael Queralta <rafaelcuba81@gmail.com>
Date: Wed, 20 Jan 2021 17:50:09 -0500
Subject: [PATCH] Fixed BUG-45583: If the user password expired, change it is
 required to complete the Terminal Authentication process. Change Password
 popup is shown to force it

---
 .../source/component/dialog/ob-expirationpassword.js        | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/web/org.openbravo.mobile.core/source/component/dialog/ob-expirationpassword.js b/web/org.openbravo.mobile.core/source/component/dialog/ob-expirationpassword.js
index ae6ff864..e9db8c2f 100644
--- a/web/org.openbravo.mobile.core/source/component/dialog/ob-expirationpassword.js
+++ b/web/org.openbravo.mobile.core/source/component/dialog/ob-expirationpassword.js
@@ -80,6 +80,9 @@ enyo.kind({
         isDefaultAction: true,
         tap: function() {
           OB.MobileApp.model.set('isLoggingIn', false);
+          if (this.owner.owner.callback) {
+            this.owner.owner.callback();
+          }
           this.owner.owner.hide();
           this.owner.owner.destroy();
           return;
@@ -109,6 +112,9 @@ enyo.kind({
       OB.MobileApp.model.get('mode'),
       'FORCE_RESET_PASSWORD'
     );
+    if (this.callback) {
+      OB.MobileApp.model.set('passResetInTermAuth', true);
+    }
     this.hide();
     this.destroy();
     return;
-- 
2.25.1

