aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-07-31 13:53:14 +0200
committerGravatar GitHub <noreply@github.com> 2025-07-31 13:53:14 +0200
commit3ce64d271b2b470bd6c9f7294946347dcdfed9b9 (patch)
tree56b5a0928f1ce2b0486e866abd5456bc43ea8ed9 /p/scripts
parentd0425f8c3ab14e72142b1a4f946d57b408f26c88 (diff)
Implement sudo mode / reauthentication (#7753)
* Implement sudo mode / reauthentication * i18n: fr * generate flags * Improvements * Remove HMAC check * Don't require reauth to access logs when signed in as admin * Notify user of bad login via notification instead --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/extra.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/p/scripts/extra.js b/p/scripts/extra.js
index c94d004ce..5a77aee4b 100644
--- a/p/scripts/extra.js
+++ b/p/scripts/extra.js
@@ -327,6 +327,11 @@ function open_slider_listener(ev) {
req.open('GET', ahref, true);
req.responseType = 'document';
req.onload = function (e) {
+ if (this.status === 403) {
+ // Redirect to reauth page (or fail if session expired)
+ location.href = a.href;
+ return;
+ }
location.href = '#slider'; // close menu/dropdown
document.documentElement.classList.add('slider-active');
slider.classList.add('active');