mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-01-06 03:54:12 +02:00
Merge branch 'feature/bootstrap5' into nightly
This commit is contained in:
commit
19fabd0e64
@ -2,8 +2,18 @@
|
||||
function customize($_action, $_item, $_data = null) {
|
||||
global $redis;
|
||||
global $lang;
|
||||
|
||||
switch ($_action) {
|
||||
case 'add':
|
||||
// disable functionality when demo mode is enabled
|
||||
if ($GLOBALS["DEMO_MODE"]) {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
'log' => array(__FUNCTION__, $_action, $_item, $_data),
|
||||
'msg' => 'demo_mode_enabled'
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if ($_SESSION['mailcow_cc_role'] != "admin") {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
@ -72,6 +82,15 @@ function customize($_action, $_item, $_data = null) {
|
||||
}
|
||||
break;
|
||||
case 'edit':
|
||||
// disable functionality when demo mode is enabled
|
||||
if ($GLOBALS["DEMO_MODE"]) {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
'log' => array(__FUNCTION__, $_action, $_item, $_data),
|
||||
'msg' => 'demo_mode_enabled'
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if ($_SESSION['mailcow_cc_role'] != "admin") {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
@ -144,6 +163,15 @@ function customize($_action, $_item, $_data = null) {
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
// disable functionality when demo mode is enabled
|
||||
if ($GLOBALS["DEMO_MODE"]) {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
'log' => array(__FUNCTION__, $_action, $_item, $_data),
|
||||
'msg' => 'demo_mode_enabled'
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if ($_SESSION['mailcow_cc_role'] != "admin") {
|
||||
$_SESSION['return'][] = array(
|
||||
'type' => 'danger',
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
// check for development mode
|
||||
$DEV_MODE = (getenv('DEV_MODE') == 'y');
|
||||
// check for demo mode
|
||||
$DEMO_MODE = (getenv('DEMO_MODE') == 'y');
|
||||
|
||||
// Slave does not serve UI
|
||||
/* if (!preg_match('/y|yes/i', getenv('MASTER'))) {
|
||||
|
@ -352,6 +352,7 @@
|
||||
"bcc_must_be_email": "BCC-Ziel %s ist keine gültige E-Mail-Adresse",
|
||||
"comment_too_long": "Kommentarfeld darf maximal 160 Zeichen enthalten",
|
||||
"defquota_empty": "Standard-Quota darf nicht 0 sein",
|
||||
"demo_mode_enabled": "Demo Mode ist aktiviert",
|
||||
"description_invalid": "Ressourcenbeschreibung für %s ist ungültig",
|
||||
"dkim_domain_or_sel_exists": "Ein DKIM-Key für die Domain \"%s\" existiert und wird nicht überschrieben",
|
||||
"dkim_domain_or_sel_invalid": "DKIM-Domain oder Selector nicht korrekt: %s",
|
||||
|
@ -352,6 +352,7 @@
|
||||
"bcc_must_be_email": "BCC destination %s is not a valid email address",
|
||||
"comment_too_long": "Comment too long, max 160 chars allowed",
|
||||
"defquota_empty": "Default quota per mailbox must not be 0.",
|
||||
"demo_mode_enabled": "Demo Mode is enabled",
|
||||
"description_invalid": "Resource description for %s is invalid",
|
||||
"dkim_domain_or_sel_exists": "A DKIM key for \"%s\" exists and will not be overwritten",
|
||||
"dkim_domain_or_sel_invalid": "DKIM domain or selector invalid: %s",
|
||||
|
@ -160,6 +160,7 @@ services:
|
||||
- ALLOW_ADMIN_EMAIL_LOGIN=${ALLOW_ADMIN_EMAIL_LOGIN:-n}
|
||||
- MASTER=${MASTER:-y}
|
||||
- DEV_MODE=${DEV_MODE:-n}
|
||||
- DEMO_MODE=${DEMO_MODE:-n}
|
||||
- WEBAUTHN_ONLY_TRUSTED_VENDORS=${WEBAUTHN_ONLY_TRUSTED_VENDORS:-n}
|
||||
restart: always
|
||||
networks:
|
||||
|
Loading…
Reference in New Issue
Block a user