[Web] Fix duplicate success message after editing a domain as domain administrator
[Web] Add "login as" button for domain admin table
This commit is contained in:
@@ -1906,12 +1906,12 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||
':description' => $description,
|
||||
':domain' => $domain
|
||||
));
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'success',
|
||||
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||
'msg' => array('domain_modified', htmlspecialchars($domain))
|
||||
);
|
||||
}
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'success',
|
||||
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||
'msg' => array('domain_modified', htmlspecialchars($domain))
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 'mailbox':
|
||||
|
@@ -52,6 +52,15 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admi
|
||||
header("Location: /user.php");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!empty(domain_admin('details', $duallogin))) {
|
||||
$_SESSION["dual-login"]["username"] = $_SESSION['mailcow_cc_username'];
|
||||
$_SESSION["dual-login"]["role"] = $_SESSION['mailcow_cc_role'];
|
||||
$_SESSION['mailcow_cc_username'] = $duallogin;
|
||||
$_SESSION['mailcow_cc_role'] = "domainadmin";
|
||||
header("Location: /user.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user