Skip to content
Snippets Groups Projects
Commit 198d54de authored by Piotr Gawron's avatar Piotr Gawron
Browse files

disable access to admin panel for anonymous user

parent a97a66fa
No related branches found
No related tags found
1 merge request!916Resolve "anonymous logged in after reopening the browser"
Pipeline #13281 failed
......@@ -49,6 +49,8 @@ minerva (14.0.0~beta.0) unstable; urgency=low
* Bug fix: too long name for data overlay in info window is trimmed (#919)
* Bug fix: too long name in general overlay list is wrapped (#857)
* Bug fix: after genome is removed list of genomes is refreshed (#922)
* Bug fix: when session expired anonymous user could access admin panel with
very limited access (#928)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 21 Aug 2019 21:00:00 +0200
......
......@@ -882,16 +882,15 @@ 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" ||
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()
}
var result;
// make sure that we are logged in
return ServerConnector.createSession().then(function () {
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 ServerConnector.getConfiguration();
}).then(function (configuration) {
params.setConfiguration(configuration);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment