[Web] Disable login for mailbox users, other SKIP_SOGO checks and fixes

master
andryyy 2020-04-29 10:57:49 +02:00
parent 200167458e
commit 447c207fb9
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
16 changed files with 67 additions and 96 deletions

View File

@ -28,7 +28,9 @@ if (isset($_SESSION['mailcow_cc_role'])) {
<br> <br>
<form class="form-horizontal" data-id="editalias" role="form" method="post"> <form class="form-horizontal" data-id="editalias" role="form" method="post">
<input type="hidden" value="0" name="active"> <input type="hidden" value="0" name="active">
<?php if (getenv('SKIP_SOGO') != "y") { ?>
<input type="hidden" value="0" name="sogo_visible"> <input type="hidden" value="0" name="sogo_visible">
<?php } ?>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="address"><?=$lang['edit']['alias'];?></label> <label class="control-label col-sm-2" for="address"><?=$lang['edit']['alias'];?></label>
<div class="col-sm-10"> <div class="col-sm-10">
@ -48,17 +50,13 @@ if (isset($_SESSION['mailcow_cc_role'])) {
<div class="checkbox"> <div class="checkbox">
<label><input class="goto_checkbox" type="checkbox" value="1" name="goto_ham" <?= ($result['goto'] == "ham@localhost") ? "checked" : null; ?>> <?=$lang['add']['goto_ham'];?></label> <label><input class="goto_checkbox" type="checkbox" value="1" name="goto_ham" <?= ($result['goto'] == "ham@localhost") ? "checked" : null; ?>> <?=$lang['add']['goto_ham'];?></label>
</div> </div>
<?php <?php if (getenv('SKIP_SOGO') != "y") { ?>
if (getenv('SKIP_SOGO') != "y") {
?>
<hr> <hr>
<div class="checkbox"> <div class="checkbox">
<label><input type="checkbox" value="1" name="sogo_visible" <?php if (isset($result['sogo_visible_int']) && $result['sogo_visible_int']=="1") { echo "checked"; }; ?>> <?=$lang['edit']['sogo_visible'];?></label> <label><input type="checkbox" value="1" name="sogo_visible" <?php if (isset($result['sogo_visible_int']) && $result['sogo_visible_int']=="1") { echo "checked"; }; ?>> <?=$lang['edit']['sogo_visible'];?></label>
</div> </div>
<p class="help-block"><?=$lang['edit']['sogo_visible_info'];?></p> <p class="help-block"><?=$lang['edit']['sogo_visible_info'];?></p>
<?php <?php } ?>
}
?>
</div> </div>
</div> </div>
<hr> <hr>
@ -577,7 +575,6 @@ if (isset($_SESSION['mailcow_cc_role'])) {
<h4><?=$lang['edit']['mailbox'];?></h4> <h4><?=$lang['edit']['mailbox'];?></h4>
<form class="form-horizontal" data-id="editmailbox" role="form" method="post"> <form class="form-horizontal" data-id="editmailbox" role="form" method="post">
<input type="hidden" value="default" name="sender_acl"> <input type="hidden" value="default" name="sender_acl">
<input type="hidden" value="0" name="active">
<input type="hidden" value="0" name="force_pw_update"> <input type="hidden" value="0" name="force_pw_update">
<input type="hidden" value="0" name="sogo_access"> <input type="hidden" value="0" name="sogo_access">
<div class="form-group"> <div class="form-group">
@ -712,9 +709,11 @@ if (isset($_SESSION['mailcow_cc_role'])) {
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<div class="checkbox"> <select name="active" class="form-control">
<label><input type="checkbox" value="1" name="active" <?=($result['active_int']=="1") ? "checked" : null;?>> <?=$lang['edit']['active'];?></label> <option value="1" <?=($result['active_int']=="1") ? 'selected' : null;?>><?=$lang['edit']['active'];?></option>
</div> <option value="2" <?=($result['active_int']=="2") ? 'selected' : null;?>><?=$lang['edit']['disable_login'];?></option>
<option value="0" <?=($result['active_int']=="0") ? 'selected' : null;?>><?=$lang['edit']['inactive'];?></option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -725,9 +724,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
</div> </div>
</div> </div>
</div> </div>
<?php <?php if (getenv('SKIP_SOGO') != "y") { ?>
if (getenv('SKIP_SOGO') != "y") {
?>
<div data-acl="<?=$_SESSION['acl']['sogo_access'];?>" class="form-group"> <div data-acl="<?=$_SESSION['acl']['sogo_access'];?>" class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<div class="checkbox"> <div class="checkbox">
@ -736,9 +733,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
</div> </div>
</div> </div>
</div> </div>
<?php <?php } ?>
}
?>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<button class="btn btn-success" data-action="edit_selected" data-id="editmailbox" data-item="<?=htmlspecialchars($result['username']);?>" data-api-url='edit/mailbox' data-api-attr='{}' href="#"><?=$lang['edit']['save'];?></button> <button class="btn btn-success" data-action="edit_selected" data-id="editmailbox" data-item="<?=htmlspecialchars($result['username']);?>" data-api-url='edit/mailbox' data-api-attr='{}' href="#"><?=$lang['edit']['save'];?></button>

View File

@ -38,9 +38,9 @@
} }
?> ?>
<link rel="stylesheet" href="/cache/<?=basename($CSSPath)?>"> <link rel="stylesheet" href="/cache/<?=basename($CSSPath)?>">
<?php if (strtolower(trim($DEFAULT_THEME)) != "lumen"): ?> <?php if (strtolower(trim($DEFAULT_THEME)) != "lumen") { ?>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/<?= strtolower(trim($DEFAULT_THEME)); ?>/bootstrap.min.css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/<?= strtolower(trim($DEFAULT_THEME)); ?>/bootstrap.min.css">
<?php endif; ?> <?php } ?>
<link rel="shortcut icon" href="/favicon.png" type="image/png"> <link rel="shortcut icon" href="/favicon.png" type="image/png">
<link rel="icon" href="/favicon.png" type="image/png"> <link rel="icon" href="/favicon.png" type="image/png">
</head> </head>
@ -91,10 +91,7 @@
if ($_SESSION['mailcow_cc_role'] == 'admin' || $_SESSION['mailcow_cc_role'] == 'domainadmin') { if ($_SESSION['mailcow_cc_role'] == 'admin' || $_SESSION['mailcow_cc_role'] == 'domainadmin') {
?> ?>
<li<?= (preg_match("/mailbox/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/mailbox"><?= $lang['header']['mailboxes']; ?></a></li> <li<?= (preg_match("/mailbox/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/mailbox"><?= $lang['header']['mailboxes']; ?></a></li>
<?php <?php } if ($_SESSION['mailcow_cc_role'] != 'admin') { ?>
}
if ($_SESSION['mailcow_cc_role'] != 'admin') {
?>
<li<?= (preg_match("/user/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/user"><?= $lang['header']['user_settings']; ?></a></li> <li<?= (preg_match("/user/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/user"><?= $lang['header']['user_settings']; ?></a></li>
<?php <?php
} }
@ -102,57 +99,40 @@
?> ?>
</ul> </ul>
</li> </li>
<?php <?php if (isset($_SESSION['mailcow_cc_role'])) { ?>
if (isset($_SESSION['mailcow_cc_role'])) {
?>
<li<?= (preg_match("/quarantine/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/quarantine"><span class="glyphicon glyphicon-briefcase"></span> <?= $lang['header']['quarantine']; ?></a></li> <li<?= (preg_match("/quarantine/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/quarantine"><span class="glyphicon glyphicon-briefcase"></span> <?= $lang['header']['quarantine']; ?></a></li>
<?php <?php } if ($_SESSION['mailcow_cc_role'] == 'admin' && getenv('SKIP_SOGO') != "y") { ?>
}
if ($_SESSION['mailcow_cc_role'] == 'admin' && getenv('SKIP_SOGO') != "y") {
?>
<li><a href data-toggle="modal" data-container="sogo-mailcow" data-target="#RestartContainer"><span class="glyphicon glyphicon-refresh"></span> <?= $lang['header']['restart_sogo']; ?></a></li> <li><a href data-toggle="modal" data-container="sogo-mailcow" data-target="#RestartContainer"><span class="glyphicon glyphicon-refresh"></span> <?= $lang['header']['restart_sogo']; ?></a></li>
<?php <?php } ?>
}
?>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-link"></span> <?= $lang['header']['apps']; ?> <span class="caret"></span></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-link"></span> <?= $lang['header']['apps']; ?> <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<?php <?php foreach ($MAILCOW_APPS as $app) {
foreach ($MAILCOW_APPS as $app): if (getenv('SKIP_SOGO') == "y" && preg_match('/^\/SOGo/i', $app['link'])) { continue; }
?> ?>
<li title="<?= htmlspecialchars($app['description']); ?>"><a href="<?= htmlspecialchars($app['link']); ?>"><?= htmlspecialchars($app['name']); ?></a></li> <li title="<?= htmlspecialchars($app['description']); ?>"><a href="<?= htmlspecialchars($app['link']); ?>"><?= htmlspecialchars($app['name']); ?></a></li>
<?php <?php
endforeach; }
$app_links = customize('get', 'app_links'); $app_links = customize('get', 'app_links');
if ($app_links) { if ($app_links) {
foreach ($app_links as $row) { foreach ($app_links as $row) {
foreach ($row as $key => $val): foreach ($row as $key => $val) {
?> ?>
<li><a href="<?= htmlspecialchars($val); ?>"><?= htmlspecialchars($key); ?></a></li> <li><a href="<?= htmlspecialchars($val); ?>"><?= htmlspecialchars($key); ?></a></li>
<?php <?php
endforeach; }
} }
} }
?> ?>
</ul> </ul>
</li> </li>
<?php <?php } if (!isset($_SESSION['dual-login']) && isset($_SESSION['mailcow_cc_username'])) { ?>
}
if (!isset($_SESSION['dual-login']) && isset($_SESSION['mailcow_cc_username'])):
?>
<li class="logged-in-as"><a href="#" onclick="logout.submit()"><b class="username-lia"><?= htmlspecialchars($_SESSION['mailcow_cc_username']); ?></b> <span class="glyphicon glyphicon-log-out"></span></a></li> <li class="logged-in-as"><a href="#" onclick="logout.submit()"><b class="username-lia"><?= htmlspecialchars($_SESSION['mailcow_cc_username']); ?></b> <span class="glyphicon glyphicon-log-out"></span></a></li>
<?php <?php } elseif (isset($_SESSION['dual-login'])) { ?>
elseif (isset($_SESSION['dual-login'])):
?>
<li class="logged-in-as"><a href="#" onclick="logout.submit()"><b class="username-lia"><?= htmlspecialchars($_SESSION['mailcow_cc_username']); ?> <span class="text-info">(<?= htmlspecialchars($_SESSION['dual-login']['username']); ?>)</span> </b><span class="glyphicon glyphicon-log-out"></span></a></li> <li class="logged-in-as"><a href="#" onclick="logout.submit()"><b class="username-lia"><?= htmlspecialchars($_SESSION['mailcow_cc_username']); ?> <span class="text-info">(<?= htmlspecialchars($_SESSION['dual-login']['username']); ?>)</span> </b><span class="glyphicon glyphicon-log-out"></span></a></li>
<?php <?php } if (!preg_match('/y|yes/i', getenv('MASTER'))) { ?>
endif;
if (!preg_match('/y|yes/i', getenv('MASTER'))):
?>
<li class="text-warning slave-info">[ slave ]</li> <li class="text-warning slave-info">[ slave ]</li>
<?php <?php } ?>
endif;
?>
</ul> </ul>
</div><!--/.nav-collapse --> </div><!--/.nav-collapse -->
</div><!--/.container-fluid --> </div><!--/.container-fluid -->

View File

@ -46,6 +46,7 @@
"delete2duplicates": "Lösche Duplikate im Ziel", "delete2duplicates": "Lösche Duplikate im Ziel",
"description": "Beschreibung", "description": "Beschreibung",
"destination": "Ziel", "destination": "Ziel",
"disable_login": "Login verbieten",
"domain": "Domain", "domain": "Domain",
"domain_matches_hostname": "Domain %s darf nicht dem Hostnamen entsprechen", "domain_matches_hostname": "Domain %s darf nicht dem Hostnamen entsprechen",
"domain_quota_m": "Domain Speicherplatz gesamt (MiB)", "domain_quota_m": "Domain Speicherplatz gesamt (MiB)",
@ -59,6 +60,7 @@
"goto_null": "Nachrichten sofort verwerfen", "goto_null": "Nachrichten sofort verwerfen",
"goto_spam": "Nachrichten als <span class=\"text-danger\"><b>Spam</b></span> lernen", "goto_spam": "Nachrichten als <span class=\"text-danger\"><b>Spam</b></span> lernen",
"hostname": "Host", "hostname": "Host",
"inactive": "Inaktiv",
"kind": "Art", "kind": "Art",
"mailbox_quota_def": "Standard-Quota einer Mailbox", "mailbox_quota_def": "Standard-Quota einer Mailbox",
"mailbox_quota_m": "Max. Speicherplatz pro Mailbox (MiB)", "mailbox_quota_m": "Max. Speicherplatz pro Mailbox (MiB)",
@ -454,6 +456,7 @@
"delete2duplicates": "Lösche Duplikate im Ziel", "delete2duplicates": "Lösche Duplikate im Ziel",
"delete_ays": "Soll der Löschvorgang wirklich ausgeführt werden?", "delete_ays": "Soll der Löschvorgang wirklich ausgeführt werden?",
"description": "Beschreibung", "description": "Beschreibung",
"disable_login": "Login verbieten",
"domain": "Domain bearbeiten", "domain": "Domain bearbeiten",
"domain_admin": "Domain-Administrator bearbeiten", "domain_admin": "Domain-Administrator bearbeiten",
"domain_quota": "Domain Speicherplatz gesamt (MiB)", "domain_quota": "Domain Speicherplatz gesamt (MiB)",
@ -472,6 +475,7 @@
"generate": "generieren", "generate": "generieren",
"grant_types": "Grant types", "grant_types": "Grant types",
"hostname": "Servername", "hostname": "Servername",
"inactive": "Inaktiv",
"kind": "Art", "kind": "Art",
"mailbox": "Mailbox bearbeiten", "mailbox": "Mailbox bearbeiten",
"mailbox_quota_def": "Standard-Quota einer Mailbox", "mailbox_quota_def": "Standard-Quota einer Mailbox",
@ -613,6 +617,7 @@
"daily": "Täglich", "daily": "Täglich",
"deactivate": "Deaktivieren", "deactivate": "Deaktivieren",
"description": "Beschreibung", "description": "Beschreibung",
"disable_login": "Login verbieten",
"disable_x": "Deaktiviere", "disable_x": "Deaktiviere",
"domain": "Domain", "domain": "Domain",
"domain_admins": "Domain-Administratoren", "domain_admins": "Domain-Administratoren",

View File

@ -46,6 +46,7 @@
"delete2duplicates": "Delete duplicates on destination", "delete2duplicates": "Delete duplicates on destination",
"description": "Description", "description": "Description",
"destination": "Destination", "destination": "Destination",
"disable_login": "Disallow login",
"domain": "Domain", "domain": "Domain",
"domain_matches_hostname": "Domain %s matches hostname", "domain_matches_hostname": "Domain %s matches hostname",
"domain_quota_m": "Total domain quota (MiB)", "domain_quota_m": "Total domain quota (MiB)",
@ -59,6 +60,7 @@
"goto_null": "Silently discard mail", "goto_null": "Silently discard mail",
"goto_spam": "Learn as <span class=\"text-danger\"><b>spam</b></span>", "goto_spam": "Learn as <span class=\"text-danger\"><b>spam</b></span>",
"hostname": "Host", "hostname": "Host",
"inactive": "Inactive",
"kind": "Kind", "kind": "Kind",
"mailbox_quota_def": "Default mailbox quota", "mailbox_quota_def": "Default mailbox quota",
"mailbox_quota_m": "Max. quota per mailbox (MiB)", "mailbox_quota_m": "Max. quota per mailbox (MiB)",
@ -453,6 +455,7 @@
"delete2duplicates": "Delete duplicates on destination", "delete2duplicates": "Delete duplicates on destination",
"delete_ays": "Please confirm the deletion process.", "delete_ays": "Please confirm the deletion process.",
"description": "Description", "description": "Description",
"disable_login": "Disallow login",
"domain": "Edit domain", "domain": "Edit domain",
"domain_admin": "Edit domain administrator", "domain_admin": "Edit domain administrator",
"domain_quota": "Domain quota", "domain_quota": "Domain quota",
@ -471,6 +474,7 @@
"generate": "generate", "generate": "generate",
"grant_types": "Grant types", "grant_types": "Grant types",
"hostname": "Hostname", "hostname": "Hostname",
"inactive": "Inactive",
"kind": "Kind", "kind": "Kind",
"mailbox": "Edit mailbox", "mailbox": "Edit mailbox",
"mailbox_quota_def": "Default mailbox quota", "mailbox_quota_def": "Default mailbox quota",
@ -612,6 +616,7 @@
"daily": "Daily", "daily": "Daily",
"deactivate": "Deactivate", "deactivate": "Deactivate",
"description": "Description", "description": "Description",
"disable_login": "Disallow login",
"disable_x": "Disable", "disable_x": "Disable",
"domain": "Domain", "domain": "Domain",
"domain_admins": "Domain administrators", "domain_admins": "Domain administrators",

View File

@ -388,6 +388,7 @@
"gal_info": "El GAL contiene todos los objetos de un dominio y no puede ser editado por ningún usuario. Falta información de disponibilidad en SOGo, si está desactivada. <b>Reinicia SOGo para aplicar los cambios.</b>", "gal_info": "El GAL contiene todos los objetos de un dominio y no puede ser editado por ningún usuario. Falta información de disponibilidad en SOGo, si está desactivada. <b>Reinicia SOGo para aplicar los cambios.</b>",
"grant_types": "Grant types", "grant_types": "Grant types",
"hostname": "Hostname", "hostname": "Hostname",
"inactive": "Inactivo",
"kind": "Tipo", "kind": "Tipo",
"mailbox": "Editar buzón", "mailbox": "Editar buzón",
"mailbox_quota_def": "Cuota de buzón predeterminada", "mailbox_quota_def": "Cuota de buzón predeterminada",

View File

@ -437,6 +437,7 @@
"gal_info": "GAL ( kalenteri ) sisältää kaikki verkkotunnus alueen objektit, eikä yksikään käyttäjä voi muokata sitä. Vapaat ja varatut ajat-tiedot SOGosta puuttuu, jos se on poistettu käytöstä! <b>Uudelleen käynnistä SOGo ja ota muutokset käyttöön.</b>", "gal_info": "GAL ( kalenteri ) sisältää kaikki verkkotunnus alueen objektit, eikä yksikään käyttäjä voi muokata sitä. Vapaat ja varatut ajat-tiedot SOGosta puuttuu, jos se on poistettu käytöstä! <b>Uudelleen käynnistä SOGo ja ota muutokset käyttöön.</b>",
"grant_types": "Oikeus tyypiy", "grant_types": "Oikeus tyypiy",
"hostname": "Hostname", "hostname": "Hostname",
"inactive": "Passiivinen",
"kind": "Kiltti", "kind": "Kiltti",
"mailbox": "Muokkaa sähköposti tiliä", "mailbox": "Muokkaa sähköposti tiliä",
"mailbox_quota_def": "Sähköpostin oletus kiintiö", "mailbox_quota_def": "Sähköpostin oletus kiintiö",

View File

@ -181,6 +181,7 @@
"exclude": "Objets à exclure (expression régulière)", "exclude": "Objets à exclure (expression régulière)",
"full_name": "Nom complet", "full_name": "Nom complet",
"hostname": "Nom d'hôte", "hostname": "Nom d'hôte",
"inactive": "Inactif",
"kind": "Type", "kind": "Type",
"mailbox": "Éditer la boîte", "mailbox": "Éditer la boîte",
"max_aliases": "Alias max.", "max_aliases": "Alias max.",

View File

@ -228,6 +228,7 @@
"force_pw_update_info": "Šis lietotājs varēs pieslēgties tikai %s.", "force_pw_update_info": "Šis lietotājs varēs pieslēgties tikai %s.",
"full_name": "Pilns vārds", "full_name": "Pilns vārds",
"hostname": "Hosta nosaukums", "hostname": "Hosta nosaukums",
"inactive": "Neaktīvs",
"kind": "Veids", "kind": "Veids",
"mailbox": "Rediģēt pastkasti", "mailbox": "Rediģēt pastkasti",
"max_aliases": "Maks. aliases", "max_aliases": "Maks. aliases",

View File

@ -469,6 +469,7 @@
"generate": "genereer", "generate": "genereer",
"grant_types": "Grant types", "grant_types": "Grant types",
"hostname": "Hostname", "hostname": "Hostname",
"inactive": "Inactief",
"kind": "Soort", "kind": "Soort",
"mailbox": "Wijzig postvak", "mailbox": "Wijzig postvak",
"mailbox_quota_def": "Standaard postvakquotum", "mailbox_quota_def": "Standaard postvakquotum",

View File

@ -162,6 +162,7 @@
"exclude": "Wyklucz obiekty (regex)", "exclude": "Wyklucz obiekty (regex)",
"full_name": "Pełna nazwa", "full_name": "Pełna nazwa",
"hostname": "Nazwa hosta", "hostname": "Nazwa hosta",
"inactive": "Nieaktywny",
"kind": "Rodzaj", "kind": "Rodzaj",
"mailbox": "Edytuj skrzynkę", "mailbox": "Edytuj skrzynkę",
"max_aliases": "Maks. liczba aliasów", "max_aliases": "Maks. liczba aliasów",

View File

@ -468,6 +468,7 @@
"generate": "сгенерировать", "generate": "сгенерировать",
"grant_types": "Разрешено типы", "grant_types": "Разрешено типы",
"hostname": "Имя хоста", "hostname": "Имя хоста",
"inactive": "Неактивный",
"kind": "Тип", "kind": "Тип",
"mailbox": "Изменение почтового ящика", "mailbox": "Изменение почтового ящика",
"mailbox_quota_def": "Квота по умолчанию", "mailbox_quota_def": "Квота по умолчанию",

View File

@ -466,6 +466,7 @@
"generate": "generovať", "generate": "generovať",
"grant_types": "Typy opravnení", "grant_types": "Typy opravnení",
"hostname": "Hostiteľ", "hostname": "Hostiteľ",
"inactive": "Neaktívny",
"kind": "Druh", "kind": "Druh",
"mailbox": "Upraviť poštovú schránku", "mailbox": "Upraviť poštovú schránku",
"mailbox_quota_def": "Predvolená veľkosť poštovej schránky", "mailbox_quota_def": "Predvolená veľkosť poštovej schránky",

View File

@ -472,6 +472,7 @@
"generate": "generera", "generate": "generera",
"grant_types": "Grant-typer", "grant_types": "Grant-typer",
"hostname": "Värdnamn", "hostname": "Värdnamn",
"inactive": "Inaktiv",
"kind": "Typ", "kind": "Typ",
"mailbox": "Ändra postlåda", "mailbox": "Ändra postlåda",
"mailbox_quota_def": "Standard kvot på postlådor", "mailbox_quota_def": "Standard kvot på postlådor",

View File

@ -92,15 +92,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
</ul> </ul>
</div> </div>
</div> </div>
<?php <?php if (getenv('ALLOW_ADMIN_EMAIL_LOGIN') == "y" && getenv('SKIP_SOGO') != "y") { ?>
if (preg_match("/^([yY][eE][sS]|[yY])+$/", $_ENV["ALLOW_ADMIN_EMAIL_LOGIN"]) && getenv('SKIP_SOGO') != "y"):
?>
<div class="panel-body help-block"> <div class="panel-body help-block">
<?=$lang['mailbox']['sogo_allow_admin_hint'];?> <?=$lang['mailbox']['sogo_allow_admin_hint'];?>
</div> </div>
<?php <?php } ?>
endif;
?>
<!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> -->
<div class="table-responsive"> <div class="table-responsive">
<table id="mailbox_table" class="table table-striped"></table> <table id="mailbox_table" class="table table-striped"></table>
@ -256,16 +252,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
<li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
<li><a data-action="delete_selected" data-id="alias" data-api-url='delete/alias' href="#"><?=$lang['mailbox']['remove'];?></a></li> <li><a data-action="delete_selected" data-id="alias" data-api-url='delete/alias' href="#"><?=$lang['mailbox']['remove'];?></a></li>
<?php <?php if (getenv('SKIP_SOGO') != "y") { ?>
if (getenv('SKIP_SOGO') != "y") {
?>
<li role="separator" class="divider"></li> <li role="separator" class="divider"></li>
<li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"sogo_visible":"1"}' href="#"><?=$lang['mailbox']['sogo_visible_y'];?></a></li> <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"sogo_visible":"1"}' href="#"><?=$lang['mailbox']['sogo_visible_y'];?></a></li>
<li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"sogo_visible":"0"}' href="#"><?=$lang['mailbox']['sogo_visible_n'];?></a></li> <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"sogo_visible":"0"}' href="#"><?=$lang['mailbox']['sogo_visible_n'];?></a></li>
<?php <?php } ?>
}
?>
</ul> </ul>
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addAliasModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_alias'];?></a> <a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addAliasModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_alias'];?></a>
</div> </div>

View File

@ -62,11 +62,14 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<div class="checkbox"> <select name="active" class="form-control">
<label><input type="checkbox" value="1" name="active" checked> <?=$lang['add']['active'];?></label> <option value="1" selected><?=$lang['add']['active'];?></option>
</div> <option value="2"><?=$lang['add']['disable_login'];?></option>
<option value="0"><?=$lang['add']['inactive'];?></option>
</select>
</div> </div>
</div> </div>
<hr>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<button class="btn btn-default" data-action="add_item" data-id="add_mailbox" data-api-url='add/mailbox' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button> <button class="btn btn-default" data-action="add_item" data-id="add_mailbox" data-api-url='add/mailbox' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>
@ -129,9 +132,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
<input type="number" class="form-control" name="quota" value="10240" required> <input type="number" class="form-control" name="quota" value="10240" required>
</div> </div>
</div> </div>
<?php <?php if (getenv('SKIP_SOGO') != "y") { ?>
if (getenv('SKIP_SOGO') != "y") {
?>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<div class="checkbox"> <div class="checkbox">
@ -140,9 +141,7 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
</div> </div>
</div> </div>
</div> </div>
<?php <?php } ?>
}
?>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<div class="checkbox"> <div class="checkbox">
@ -183,29 +182,18 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
<hr> <hr>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<?php <?php if (getenv('SKIP_SOGO') != "y") { ?>
if (getenv('SKIP_SOGO') != "y") {
?>
<button class="btn btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{}' href="#"><?=$lang['add']['add_domain_only'];?></button> <button class="btn btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{}' href="#"><?=$lang['add']['add_domain_only'];?></button>
<button class="btn btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{"restart_sogo":"1"}' href="#"><?=$lang['add']['add_domain_restart'];?></button> <button class="btn btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{"restart_sogo":"1"}' href="#"><?=$lang['add']['add_domain_restart'];?></button>
<?php <?php } else { ?>
}
else {
?>
<button class="btn btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{}' href="#"><?=$lang['add']['add'];?></button> <button class="btn btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{}' href="#"><?=$lang['add']['add'];?></button>
<?php <?php } ?>
}
?>
</div> </div>
</div> </div>
<?php <?php // TODO: Separate SOGo-related text
// TODO: Separate SOGo-related text if (getenv('SKIP_SOGO') != "y") { ?>
if (getenv('SKIP_SOGO') != "y") {
?>
<p><span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$lang['add']['post_domain_add'];?></p> <p><span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$lang['add']['post_domain_add'];?></p>
<?php <?php } ?>
}
?>
</form> </form>
</div> </div>
</div> </div>
@ -313,17 +301,13 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
<div class="checkbox"> <div class="checkbox">
<label><input class="goto_checkbox" type="checkbox" value="1" name="goto_ham"> <?=$lang['add']['goto_ham'];?></label> <label><input class="goto_checkbox" type="checkbox" value="1" name="goto_ham"> <?=$lang['add']['goto_ham'];?></label>
</div> </div>
<?php <?php if (getenv('SKIP_SOGO') != "y") { ?>
if (getenv('SKIP_SOGO') != "y") {
?>
<hr> <hr>
<div class="checkbox"> <div class="checkbox">
<label><input type="checkbox" value="1" name="sogo_visible" checked> <?=$lang['edit']['sogo_visible'];?></label> <label><input type="checkbox" value="1" name="sogo_visible" checked> <?=$lang['edit']['sogo_visible'];?></label>
</div> </div>
<p class="help-block"><?=$lang['edit']['sogo_visible_info'];?></p> <p class="help-block"><?=$lang['edit']['sogo_visible_info'];?></p>
<?php <?php } ?>
}
?>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -307,6 +307,7 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == '
<p class="help-block"><?=$lang['user']['quarantine_notification_info'];?></p> <p class="help-block"><?=$lang['user']['quarantine_notification_info'];?></p>
</div> </div>
</div> </div>
<?php if (getenv('SKIP_SOGO') != "y") { ?>
<hr> <hr>
<div class="row"> <div class="row">
<div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['eas_reset'];?>:</div> <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['eas_reset'];?>:</div>
@ -322,6 +323,7 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == '
<p class="help-block"><?=$lang['user']['sogo_profile_reset_help'];?></p> <p class="help-block"><?=$lang['user']['sogo_profile_reset_help'];?></p>
</div> </div>
</div> </div>
<?php } ?>
</div> </div>
</div> </div>
</div> </div>