When a non-logged user tries to access a guest console:
https://localhost:8001/vnc_auto.html?port=64667&path=?token=dWJ1bnR1M...
He/she will be asked to login and then he/she must be redirected back to the
same URL accessed prior to login (ie, the guest console).
To do that, we use the "next" query parameter. But commit 22eba438 wrongly
overrided this logic by only querying the last tab visited which was
redirecting user to the Kimchi main page instead of the guest console.
Fix it.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.login.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/ui/js/src/kimchi.login.js b/ui/js/src/kimchi.login.js
index f9c9af0..cacfa65 100644
--- a/ui/js/src/kimchi.login.js
+++ b/ui/js/src/kimchi.login.js
@@ -56,7 +56,6 @@ kimchi.login_main = function() {
var lastPage = kimchi.cookie.get('lastPage');
var next_url = lastPage ? lastPage.replace(/\"/g,'') :
"/";
}
- var next_url = lastPage ? lastPage.replace(/\"/g,'') :
"/";
kimchi.cookie.set('roles',JSON.stringify(data.roles));
window.location.replace(next_url)
}, function() {
--
1.9.3