Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
46a1194c
Commit
46a1194c
authored
Aug 21, 2019
by
Piotr Gawron
Browse files
workaround for FF Private Window mode when cookies are preserved and localStorage is not
parent
93db78e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
46a1194c
minerva
(
14.0.0
~
beta
.0
)
unstable
;
urgency
=
low
*
Bug
fix
:
work
on
FF
Private
Window
mode
could
cause
logout
or
raise
an
error
on
when
opening
new
tab
with
minerva
(#
892
)
*
Bug
fix
:
fetching
list
of
miRnas
resulted
sometimes
in
"Internal Server
Error"
(#
889
)
*
Bug
fix
:
user
without
admin
right
can
accept
terms
of
service
(#
893
)
...
...
frontend-js/src/main/js/ServerConnector.js
View file @
46a1194c
...
...
@@ -182,7 +182,16 @@ ServerConnector.sendGetRequest = function (url, description) {
ServerConnector
.
isSessionValid
=
function
()
{
var
self
=
this
;
return
self
.
_sendRequest
({
method
:
"
GET
"
,
url
:
this
.
isSessionValidUrl
()}).
then
(
function
(
content
)
{
return
JSON
.
parse
(
content
).
login
===
self
.
getSessionData
(
null
).
getLogin
();
var
sessionLogin
=
self
.
getSessionData
(
null
).
getLogin
();
var
serverSideLogin
=
JSON
.
parse
(
content
).
login
;
//this is workaround for the problem with Firefox Private Window issue
//in FF new tab is opened with existing cookies but localStorage is cleared
if
(
sessionLogin
===
undefined
||
sessionLogin
===
null
)
{
console
.
log
(
"
SET USER
"
);
self
.
getSessionData
(
null
).
setLogin
(
serverSideLogin
);
}
return
serverSideLogin
===
self
.
getSessionData
(
null
).
getLogin
();
}).
catch
(
function
(
error
)
{
if
(
error
instanceof
NetworkError
)
{
if
(
error
.
statusCode
===
HttpStatus
.
FORBIDDEN
||
error
.
statusCode
===
HttpStatus
.
UNAUTHORIZED
)
{
...
...
frontend-js/src/main/js/SessionData.js
View file @
46a1194c
...
...
@@ -2,7 +2,6 @@
/* exported logger */
var
Point
=
require
(
'
./map/canvas/Point
'
);
var
SessionObjectType
=
require
(
'
./SessionObjectType
'
);
// noinspection JSUnusedLocalSymbols
...
...
@@ -307,7 +306,7 @@ SessionData.prototype.setLogin = function (login) {
/**
*
* @returns {string}
* @returns {
?null|
string}
*/
SessionData
.
prototype
.
getLogin
=
function
()
{
var
key
=
SessionObjectType
.
LOGIN
;
...
...
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