Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
198d54de
Commit
198d54de
authored
Aug 28, 2019
by
Piotr Gawron
Browse files
disable access to admin panel for anonymous user
parent
a97a66fa
Pipeline
#13281
failed with stage
in 20 minutes and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
198d54de
...
...
@@ -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
...
...
frontend-js/src/main/js/minerva.js
View file @
198d54de
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment