Commit 09628be3 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

login can be null or undefined

parent a8c68dd0
......@@ -278,13 +278,13 @@ function initGlobals(params) {
if (global.ServerConnector === undefined) {
global.ServerConnector = ServerConnector;
if (params.isDebug()) {
logger.level="debug";
logger.level = "debug";
} else {
logger.level="info";
logger.level = "info";
}
GuiConnector.init();
if (GuiConnector.getParams['debug'] !== undefined) {
logger.level="debug";
logger.level = "debug";
}
} else {
logger.warn("global ServerConnector found");
......@@ -674,7 +674,7 @@ function createLoginDiv(configuration) {
className: "minerva-login-caps-lock-warning",
content: "Warning: Caps lock is on"
}));
GuiConnector.addListener("onCapsLockChange",function(e){
GuiConnector.addListener("onCapsLockChange", function (e) {
if (e.arg) {
$(".minerva-login-caps-lock-warning").css("display", "block");
} else {
......@@ -867,7 +867,9 @@ function createAdmin(params) {
params.getElement().style.display = "table";
params.getElement().innerHTML = "<div style='vertical-align:middle;display:table-cell;text-align: center'>"
+ "<img src='resources/images/icons/ajax-loader.gif'/>" + "</div>";
if (ServerConnector.getSessionData(null).getLogin() === "anonymous") {
if (ServerConnector.getSessionData(null).getLogin() === "anonymous" ||
ServerConnector.getSessionData(null).getLogin() === null ||
ServerConnector.getSessionData(null).getLogin() === undefined) {
window.location.href = ServerConnector.getServerBaseUrl() + "login.xhtml?from=" + encodeURI(window.location.href);
return Promise.resolve()
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment