cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject [50/55] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to f38be48
Date Mon, 08 Apr 2013 13:14:00 GMT
CLOUDSTACK-1957: cloudstack UI - fix a JS error "'logout' is undefined" which sometimes shows
on login screen.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7de2b4b3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7de2b4b3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7de2b4b3

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 7de2b4b30adbf48922f849eb10fd5f49f6d19ad0
Parents: ebcdef5
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Sun Apr 7 11:40:46 2013 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Sun Apr 7 11:40:46 2013 -0700

----------------------------------------------------------------------
 ui/scripts/cloudStack.js |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7de2b4b3/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index faa7789..0cf80b0 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -115,6 +115,11 @@
       // Use this for checking the session, to bypass login screen
       bypassLoginCheck: function(args) { //determine to show or bypass login screen
 			  if (g_loginResponse == null) { //show login screen
+				  /*
+					but if this is a 2nd browser window (of the same domain), login screen still won't show
because $.cookie('sessionKey') is valid for 2nd browser window (of the same domain) as well.
+					i.e. calling listCapabilities API with g_sessionKey from $.cookie('sessionKey') will
succeed, 
+					then userValid will be set to true, then an user object (instead of "false") will be
returned, then login screen will be bypassed.          				
+					*/
 					g_mySession = $.cookie('JSESSIONID');
 					g_sessionKey = $.cookie('sessionKey');
 					g_role = $.cookie('role');        
@@ -176,8 +181,7 @@
 						
             userValid = true;
           },
-          error: function(xmlHTTP) {
-            logout(false);
+          error: function(xmlHTTP) { //override default error handling, do nothing instead
of showing error "unable to verify user credentials" on login screen          
           },
           beforeSend : function(XMLHttpResponse) {					  
 						return true;


Mime
View raw message