Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117748027
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
5 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/docker/roundcube/rootfs/opt/app-root/src/roundcubemail-config-templates/kolab.inc.php b/docker/roundcube/rootfs/opt/app-root/src/roundcubemail-config-templates/kolab.inc.php
index 1396343e..ebc0d849 100644
--- a/docker/roundcube/rootfs/opt/app-root/src/roundcubemail-config-templates/kolab.inc.php
+++ b/docker/roundcube/rootfs/opt/app-root/src/roundcubemail-config-templates/kolab.inc.php
@@ -1,61 +1,65 @@
<?php
// Kolab Cockpit API location. Defaults to hostname from the HTTP request
$config['kolab_api_url'] = getenv('KOLAB_API_URL');
// Enable logging of Cockpit API requests/responses (to logs/kolab.log)
$config['kolab_api_debug'] = getenv('KOLAB_API_DEBUG');
// List of allowed tasks in helpdesk mode. If empty there's no limits.
// For example, to limit user to the Settings section only: ['settings'].
$config['kolab_helpdesk_allowed_tasks'] = [];
// Type of cache for API requests. Supported values: 'db', 'redis' and 'memcache' or 'memcached'.
$config['kolab_client_cache'] = 'redis';
// Lifetime of cache entries. Possible units: s, m, h, d, w
$config['kolab_client_cache_ttl'] = '10m';
$config['configuration-overlays']['kolabobjects'] = [
'plugins' => ['kolab_config', 'kolab_folders'],
'calendar_driver' => 'kolab',
'fileapi_backend' => 'kolab',
'kolab_tags_driver' => 'kolab',
'tasklist_driver' => 'kolab',
'kolab_addressbook_driver' => 'kolab'
];
$config['configuration-overlays']['kolab4'] = [
'calendar_driver' => 'caldav',
'calendar_caldav_server' => getenv('CALENDAR_CALDAV_SERVER') ?: "https://" . ($_SERVER["HTTP_HOST"] ?? null) . "/dav",
'fileapi_backend' => 'kolabfiles',
'fileapi_kolabfiles_baseuri' => getenv('FILEAPI_KOLABFILES_BASEURI'),
'activesync_storage' => 'kolab4',
'activesync_dav_server' => getenv('CALENDAR_CALDAV_SERVER') ?: "https://" . ($_SERVER["HTTP_HOST"] ?? null) . "/dav",
'kolab_tags_driver' => 'annotate',
'kolab_dav_sharing' => 'sharing',
'tasklist_driver' => 'caldav',
'tasklist_caldav_server' => getenv('TASKLIST_CALDAV_SERVER') ?: "https://" . ($_SERVER["HTTP_HOST"] ?? null) . "/dav",
'kolab_addressbook_driver' => 'carddav',
'kolab_addressbook_carddav_server' => getenv('KOLAB_ADDRESSBOOK_CARDDAV_SERVER') ?: "https://" . ($_SERVER["HTTP_HOST"] ?? null) . "/dav",
];
$config['configuration-overlays']['activesync'] = [
'plugins' => ['kolab_activesync']
];
$config['configuration-overlays']['2fa'] = [
'plugins' => ['kolab_2fa']
];
$config['configuration-overlays']['groupware'] = [
+ 'plugins' => ['calendar', 'kolab_files', 'kolab_addressbook', 'kolab_tags', 'tasklist']
+];
+
+$config['configuration-overlays']['groupware-kolabobjects'] = [
'plugins' => ['calendar', 'kolab_files', 'kolab_addressbook', 'kolab_tags', 'kolab_notes', 'tasklist']
];
if ($disabledPlugins = getenvlist('DISABLED_PLUGINS')) {
foreach ($config['configuration-overlays'] as $key => $value) {
if (isset($value['plugins'])) {
$config['configuration-overlays'][$key]['plugins'] = array_diff($value['plugins'], $disabledPlugins);
}
}
}
diff --git a/src/app/Http/Controllers/API/V4/ConfigController.php b/src/app/Http/Controllers/API/V4/ConfigController.php
index 412c148d..4ae24355 100644
--- a/src/app/Http/Controllers/API/V4/ConfigController.php
+++ b/src/app/Http/Controllers/API/V4/ConfigController.php
@@ -1,68 +1,72 @@
<?php
namespace App\Http\Controllers\API\V4;
use App\Http\Controllers\Controller;
use App\UserSetting;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class ConfigController extends Controller
{
public const DEBUG_TTL = 12; // hours
/**
* Get the per-user webmail configuration.
*
* @return JsonResponse The response
*/
public function webmail(Request $request)
{
$user = $this->guard()->user();
if (!$this->checkTenant($user)) {
return $this->errorResponse(404);
}
$config = [
'kolab-configuration-overlays' => [],
];
$skus = $user->skuTitles();
if ((bool) $user->getSetting('kolabobjects_storage')) {
$config['kolab-configuration-overlays'][] = 'kolabobjects';
} else {
$config['kolab-configuration-overlays'][] = 'kolab4';
}
if (in_array('activesync', $skus)) {
$config['kolab-configuration-overlays'][] = 'activesync';
}
if (in_array('2fa', $skus)) {
$config['kolab-configuration-overlays'][] = '2fa';
}
if (in_array('groupware', $skus)) {
- $config['kolab-configuration-overlays'][] = 'groupware';
+ if ((bool) $user->getSetting('kolabobjects_storage')) {
+ $config['kolab-configuration-overlays'][] = 'groupware-kolabobjects';
+ } else {
+ $config['kolab-configuration-overlays'][] = 'groupware';
+ }
}
if ($debug_setting = $user->settings()->where('key', 'debug')->first()) {
/** @var UserSetting $debug_setting */
// Make sure the setting didn't expire
if ($debug_setting->updated_at->isBefore(now()->subHours(self::DEBUG_TTL))) {
$debug_setting->delete();
} else {
$config['debug'] = $debug_setting->value;
}
}
// TODO: Per-domain configuration, e.g. skin/logo
// $config['skin'] = 'apostrophy';
// $config['skin_logo'] = 'data:image/svg+xml;base64,'
// . base64_encode(file_get_contents(storage_path('logo.svg')));
return response()->json($config);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Apr 4, 12:44 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18821750
Default Alt Text
(5 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline