1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-28 19:47:23 +01:00

refactor management daemon authentication a) to separate authorization and b) to use 'doveadm pw' rather than 'doveadm auth test' so that it is decoupled from dovecot's login mechanism

This commit is contained in:
Joshua Tauberer
2014-11-30 10:43:07 -05:00
parent 31d6128a2b
commit c2ec6e66b8
4 changed files with 89 additions and 29 deletions

View File

@@ -74,6 +74,13 @@ function do_login() {
// Reset any saved credentials.
do_logout();
} else if (!("api_key" in response)) {
// Login succeeded but user might not be authorized!
show_modal_error("Login Failed", "You are not an administrator on this system.")
// Reset any saved credentials.
do_logout();
} else {
// Login succeeded.