Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
7f22aeb5
Commit
7f22aeb5
authored
Jun 21, 2016
by
Christoph Wurst
Committed by
Thomas Müller
Jun 21, 2016
Browse files
redirect to new login route (#25099)
* redirect to new login route * encode anchor in url and restore it client-side
parent
195fc5b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/private/legacy/util.php
View file @
7f22aeb5
...
...
@@ -962,11 +962,12 @@ class OC_Util {
public
static
function
checkLoggedIn
()
{
// Check if we are a user
if
(
!
OC_User
::
isLoggedIn
())
{
header
(
'Location: '
.
\
OCP\Util
::
linkToAbsolute
(
''
,
'index.php'
,
[
'redirect_url'
=>
\
OC
::
$server
->
getRequest
()
->
getRequestUri
()
]
)
header
(
'Location: '
.
\
OC
::
$server
->
getURLGenerator
()
->
linkToRoute
(
'core.login.showLoginForm'
,
[
'redirect_url'
=>
urlencode
(
\
OC
::
$server
->
getRequest
()
->
getRequestUri
()),
]
)
);
exit
();
}
...
...
settings/js/personal.js
View file @
7f22aeb5
...
...
@@ -368,6 +368,17 @@ $(document).ready(function () {
collection
:
collection
});
view
.
reload
();
// 'redirect' to anchor sections
// anchors are lost on redirects (e.g. while solving the 2fa challenge) otherwise
// example: /settings/person?section=devices will result in /settings/person?#devices
if
(
!
window
.
location
.
hash
)
{
var
query
=
OC
.
parseQueryString
(
location
.
search
);
if
(
query
&&
query
.
section
)
{
OC
.
Util
.
History
.
replaceState
({});
window
.
location
.
hash
=
query
.
section
;
}
}
});
if
(
!
OC
.
Encryption
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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