Skip to content

Commit 1a3bbdf

Browse files
committed
fix(panel): add error message when user is not allowed to acces panel
1 parent 14ca053 commit 1a3bbdf

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

crates/rustmail_panel/src/pages/panel.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ pub fn panel() -> Html {
5858
if matches!(auth, Some(false)) {
5959
let win = window();
6060
if let Ok(pathname) = win.location().pathname() {
61-
let redirect = urlencoding::encode(&pathname);
62-
let _ = win
63-
.location()
64-
.set_href(&format!("/api/auth/login?redirect={}", redirect));
61+
let _ = win.location().set_href("/error?message=Access+Denied");
6562
} else {
6663
let _ = win.location().set_href("/api/auth/login");
6764
}

0 commit comments

Comments
 (0)