cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to 8d3a9b7
Date Wed, 29 Oct 2014 18:17:28 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 160fc1371 -> 8d3a9b760


CLOUDSTACK-7809: UI > remove usage of g_mySession which is unnecessary.


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

Branch: refs/heads/master
Commit: 8d3a9b760dbcf6ba822503a72dda5f51e5e42fad
Parents: 160fc13
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Oct 29 11:14:58 2014 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Wed Oct 29 11:17:18 2014 -0700

----------------------------------------------------------------------
 ui/scripts/cloudStack.js      | 31 +++----------------------------
 ui/scripts/sharedFunctions.js |  2 +-
 2 files changed, 4 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d3a9b76/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 49af7f7..c5aa89c 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -93,26 +93,6 @@
                     message: parseXMLHttpResponse(data),
                     clickAction: clickAction
                 });
-            },
-            beforeSend: function(XMLHttpRequest) {
-                if (g_mySession == $.cookie("JSESSIONID")) {
-                    return true;
-                } else {
-                    var clickAction = function() {
-                        $('#user-options a').eq(0).trigger('click');
-                    };
-
-                    if ($('.notification-box:visible').size()) {
-                        $('.notification-box, div.overlay:first').remove();
-                    }
-
-                    cloudStack.dialog.notice({
-                        message: _l('label.session.expired'),
-                        clickAction: clickAction
-                    }).closest('.ui-dialog').overlay();
-
-                    return false;
-                }
             }
         });
 
@@ -137,7 +117,6 @@
                         }
                         return cookieValue;
                     };
-                    g_mySession = $.cookie('JSESSIONID');
                     g_sessionKey = unBoxCookieValue('sessionKey');
                     g_role = unBoxCookieValue('role');
                     g_userid = unBoxCookieValue('userid');
@@ -147,7 +126,6 @@
                     g_userfullname = unBoxCookieValue('userfullname');
                     g_timezone = unBoxCookieValue('timezone');                    
                 } else { //single-sign-on	(bypass login screen)
-                    g_mySession = $.cookie('JSESSIONID');
                     g_sessionKey = encodeURIComponent(g_loginResponse.sessionkey);
                     g_role = g_loginResponse.type;
                     g_username = g_loginResponse.username;
@@ -238,8 +216,7 @@
                     async: false,
                     success: function(json) {
                         var loginresponse = json.loginresponse;
-
-                        g_mySession = $.cookie('JSESSIONID');
+                        
                         g_sessionKey = encodeURIComponent(loginresponse.sessionkey);
                         g_role = loginresponse.type;
                         g_username = loginresponse.username;
@@ -335,8 +312,7 @@
                 $.ajax({
                     url: createURL('logout'),
                     async: false,
-                    success: function() {
-                        g_mySession = null;
+                    success: function() {                        
                         g_sessionKey = null;
                         g_username = null;
                         g_account = null;
@@ -347,8 +323,7 @@
                         g_kvmsnapshotenabled = null;
                         g_regionsecondaryenabled = null;
                         g_loginCmdText = null;
-
-                        $.cookie('JSESSIONID', null);
+                        
                         $.cookie('sessionKey', null);
                         $.cookie('username', null);
                         $.cookie('account', null);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d3a9b76/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 21dbe15..d463381 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -14,7 +14,7 @@
 // KIND, either express or implied.  See the License for the
 // specific language governing permissions and limitations
 // under the License.
-var g_mySession = null;
+
 var g_sessionKey = null;
 var g_role = null; // roles - root, domain-admin, ro-admin, user
 var g_username = null;


Mime
View raw message