-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reload page instead of file list when getting 401 authentification error #30141
Conversation
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>
Hmm actually this only handle the case there we are one folder deep. |
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
I changed that to not even checking if we are on the root directory. A 401 should be enough to detect an authentication problem. From my local testing, 401 only happens when there is an authentication problem. 404 is when the folder is missing, 403 is when the user doesn't have access to the folder (e.g. file_accesscontrol) |
/backport to stable23 |
/backport to stable22 |
/backport to stable21 |
We also need to add error handling in apps/viewer/src/services/FileInfo.js... |
Failure unrelated |
When getting a 401 error, instead of reloading the file list and hopping we are now
authenticated, we reload the page completely. This triggers a redirection to the login
page automatically with the correct ?redirect_url= in the URL, so that once logged the
user goes back to the place they were previously.
Test plan
Signed-off-by: Carl Schwan carl@carlschwan.eu