Skip to content

Commit a4ff409

Browse files
authored
Merge pull request #338 from Rustmail/328-add-an-error-when-the-user-is-not-allowed-to-access-the-web-panel
fix(panel): add error message when user is not allowed to acces panel
2 parents ac171e5 + 1a3bbdf commit a4ff409

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)