From 11c8ef98c962128980e3dfb6a47f81ddea0e0978 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 30 May 2012 21:55:43 +0200 Subject: [PATCH] Add ReadOnly support --- .../templates/usr/share/sogosync/config.php/45Backend60Caldav | 8 ++++++++ .../templates/usr/share/sogosync/config.php/45Backend70Carddav | 9 +++++++++ smeserver-sogosync.spec | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend60Caldav b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend60Caldav index 6d2f5fb..5685de1 100644 --- a/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend60Caldav +++ b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend60Caldav @@ -2,3 +2,11 @@ define('CALDAV_PATH', '/SOGo/dav/%u/'); define('CALDAV_PERSONAL', 'personal'); define('CALDAV_SERVER', 'http://localhost:{$sogod{'TCPPort'}}/SOGo/dav/%u'); +{ + +my $ro = $sogosync{'ReadOnly'} || 'disabled'; + +$OUT .= " define('CALDAV_READONLY', true);\n" + if ($ro =~ m/^yes|enabled|1$/); + +} diff --git a/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend70Carddav b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend70Carddav index 68250a0..075afb9 100644 --- a/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend70Carddav +++ b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend70Carddav @@ -1,2 +1,11 @@ define('CARDDAV_PERSONAL', 'personal'); define('CARDDAV_URL', 'http://localhost:{$sogod{'TCPPort'}}/SOGo/dav/%u/Contacts/'); +{ + +my $ro = $sogosync{'ReadOnly'} || 'disabled'; + +$OUT .= " define('CARDDAV_READONLY', true);\n" + if ($ro =~ m/^yes|enabled|1$/); + +} + diff --git a/smeserver-sogosync.spec b/smeserver-sogosync.spec index d76c071..0345e98 100644 --- a/smeserver-sogosync.spec +++ b/smeserver-sogosync.spec @@ -1,5 +1,5 @@ Name: smeserver-sogosync -Version: 0.1.3 +Version: 0.1.4 Release: 0.beta5%{?dist} Summary: SME Server integration for sogosync @@ -31,6 +31,7 @@ rm -rf $RPM_BUILD_ROOT /bin/rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ > %{name}-%{version}-filelist +echo "%doc CHANGELOG.git" >> %{name}-%{version}-filelist %files -f %{name}-%{version}-filelist %defattr(-,root,root)