1
0
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:
FreddleSpl0it
2025-10-16 13:42:39 +02:00
parent 6af2addf3c
commit aaa23d2dc1
41 changed files with 186 additions and 132 deletions

View File

@@ -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");