-
-
Save dmamolina/9e1413ed11fb9f62a8d7 to your computer and use it in GitHub Desktop.
Fix selfservice cookie expiration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/sunstone/public/js/sunstone.js b/src/sunstone/public/js/sunstone.js | |
index e253214..bda9e17 100644 | |
--- a/src/sunstone/public/js/sunstone.js | |
+++ b/src/sunstone/public/js/sunstone.js | |
@@ -296,10 +296,24 @@ $(document).ready(function(){ | |
setLogin(); | |
setInterval(function(){ | |
- var user_cookie = cookie["one-user"]; | |
- readCookie(); | |
- if ((cookie["one-user"] == null) || (cookie["one-user"] !== user_cookie)) { | |
- window.location.href='/'; | |
+ if (whichUI() == "sunstone") { | |
+ var user_cookie = cookie["one-user"]; | |
+ readCookie(); | |
+ if ((cookie["one-user"] == null) || (cookie["one-user"] !== user_cookie)) { | |
+ window.location.href='/'; | |
+ } | |
+ } else if (whichUI() == "selfservice") { | |
+ var user_cookie = cookie["occi-user"]; | |
+ readCookie(); | |
+ if ((cookie["occi-user"] == null) || (cookie["occi-user"] !== user_cookie)) { | |
+ window.location.href='/'; | |
+ } | |
+ } else if (whichUI() == "ozones") { | |
+ var user_cookie = cookie["ozones-user"]; | |
+ readCookie(); | |
+ if ((cookie["ozones-user"] == null) || (cookie["ozones-user"] !== user_cookie)) { | |
+ window.location.href='/'; | |
+ } | |
} | |
},5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment