mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-01-31 01:27:15 +00:00
[Web] Add User ACL to manage SOGo access
This commit is contained in:
@@ -11,7 +11,10 @@ if (isset($_SESSION['mailcow_cc_role']) && isset($_SESSION['oauth2_request'])) {
|
||||
elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user') {
|
||||
$user_details = mailbox("get", "mailbox_details", $_SESSION['mailcow_cc_username']);
|
||||
$is_dual = (!empty($_SESSION["dual-login"]["username"])) ? true : false;
|
||||
if (intval($user_details['attributes']['sogo_access']) == 1 && !$is_dual && getenv('SKIP_SOGO') != "y") {
|
||||
if (intval($user_details['attributes']['sogo_redirection']) == 1 &&
|
||||
hasACLAccess('sogo_access') &&
|
||||
!$is_dual &&
|
||||
getenv('SKIP_SOGO') != "y") {
|
||||
header("Location: /SOGo/so/");
|
||||
} else {
|
||||
header("Location: /user");
|
||||
|
||||
Reference in New Issue
Block a user