cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: refs/heads/master - Regions single-sign-on: Hide login form on redirect
Date Thu, 21 Mar 2013 22:27:59 GMT
Updated Branches:
  refs/heads/master 85ef51170 -> 0fbf1b91b


Regions single-sign-on: Hide login form on redirect

If login URL is passed to management server on load, show loading
screen in place of login form.


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

Branch: refs/heads/master
Commit: 0fbf1b91b057036d9015d679866d7f938686375e
Parents: 85ef511
Author: Brian Federle <brian.federle@citrix.com>
Authored: Thu Mar 21 15:27:44 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Thu Mar 21 15:27:44 2013 -0700

----------------------------------------------------------------------
 ui/scripts/cloudStack.js      |    6 ++++++
 ui/scripts/ui-custom/login.js |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0fbf1b91/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 00b06ab..5b6d519 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -460,6 +460,12 @@
     };
 		
     document.title = 'CloudStack';
+
+    if ($.cookie('loginUrl') != null || $.urlParam('loginUrl') != 0) {
+      // SSO
+      loginArgs.hideLoginScreen = true;
+    }
+    
     cloudStack.uiCustom.login(loginArgs);
 
     // Localization

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0fbf1b91/ui/scripts/ui-custom/login.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/login.js b/ui/scripts/ui-custom/login.js
index c092b82..8769609 100644
--- a/ui/scripts/ui-custom/login.js
+++ b/ui/scripts/ui-custom/login.js
@@ -128,5 +128,11 @@
     });
     
     $languageSelect.val($.cookie('lang'));
+
+    // Hide login screen, mainly for SSO
+    if (args.hideLoginScreen) {
+      $login.children().hide();
+      $login.append($('<div>').addClass('loading-overlay'));
+    }
   };
 })(jQuery, cloudStack);


Mime
View raw message