Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
198d54de
Commit
198d54de
authored
5 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
disable access to admin panel for anonymous user
parent
a97a66fa
No related branches found
No related tags found
1 merge request
!916
Resolve "anonymous logged in after reopening the browser"
Pipeline
#13281
failed
5 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG
+2
-0
2 additions, 0 deletions
CHANGELOG
frontend-js/src/main/js/minerva.js
+5
-6
5 additions, 6 deletions
frontend-js/src/main/js/minerva.js
with
7 additions
and
6 deletions
CHANGELOG
+
2
−
0
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
...
...
This diff is collapsed.
Click to expand it.
frontend-js/src/main/js/minerva.js
+
5
−
6
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment