mirror of
https://github.com/nextcloud/server.git
synced 2026-03-24 19:33:49 -04:00
Stop reloading file list when getting 401 error on root dir
When reaching the root dir, instead of reloading the file list we reload the page completely. This trigger a redirection to the login page automatically with the correct ?redirect_url= in thr url. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
parent
5a47384300
commit
c003a56816
1 changed files with 4 additions and 0 deletions
|
|
@ -2087,6 +2087,10 @@
|
|||
this.hideMask();
|
||||
|
||||
if (status === 401) {
|
||||
if (this.getCurrentDirectory() === '/') {
|
||||
// Give up, if we are not authorized to access user root folder, we are logged out
|
||||
location.reload(); // this will redirect the user to the login page while saving the current url
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue