summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2010-06-04 09:27:15 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2010-06-04 09:27:15 (GMT)
commit174a62adc9811f6496b1487636e631c423fdb865 (patch)
treef7058a10b4d6edc2bee9271788ec0d0d4aecca76
parente815ec83e03ee3b788ea3e41e1daf5305191620f (diff)
downloadserver-174a62adc9811f6496b1487636e631c423fdb865.tar.gz
kolab/issue4237 (additional event.default folder created by kolabd (rt#6038))
-rw-r--r--perl-kolab/ChangeLog5
-rw-r--r--perl-kolab/lib/Kolab/Cyrus.pm33
-rw-r--r--perl-kolab/lib/Kolab/LDAP.pm4
-rw-r--r--release-notes.txt7
4 files changed, 45 insertions, 4 deletions
diff --git a/perl-kolab/ChangeLog b/perl-kolab/ChangeLog
index 081a8a0..1870e58 100644
--- a/perl-kolab/ChangeLog
+++ b/perl-kolab/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-04 Gunnar Wrobel <wrobel@pardus.de>
+
+ * lib/Kolab/Cyrus.pm: kolab/issue4237 (additional event.default
+ folder created by kolabd (rt#6038))
+
2009-12-16 Sascha Wilde <wilde@intevation.de>
* lib/Kolab/LDAP.pm (deleteObject): kolab/issue3940 (Deleting
diff --git a/perl-kolab/lib/Kolab/Cyrus.pm b/perl-kolab/lib/Kolab/Cyrus.pm
index 339f85c..2a9436d 100644
--- a/perl-kolab/lib/Kolab/Cyrus.pm
+++ b/perl-kolab/lib/Kolab/Cyrus.pm
@@ -40,6 +40,7 @@ our %EXPORT_TAGS = (
&create
&createUid
&createMailbox
+ &createCalendar
&deleteMailbox
&setQuota
&setACL
@@ -109,6 +110,38 @@ sub createMailbox
}
}
+sub createCalendar
+{
+ my $cyrus = shift;
+ my $user = shift;
+ my $domain = shift;
+ my $folder = shift;
+ my $acl = shift;
+
+ my $calendar = 0;
+
+ my @mailboxes = $cyrus->list("user/$user/*\@$domain");
+ my %info;
+ foreach my $mailbox (@mailboxes) {
+ my $u = @{$mailbox}[0];
+ %info = $cyrus->info($u, ('/vendor/kolab/folder-type'));
+ my $key = '/mailbox/{' . $u . '}/vendor/kolab/folder-type';
+ if (exists($info{$key}) && $info{$key} eq 'event.default') {
+ $calendar = $u;
+ }
+ }
+
+ if ($calendar) {
+ Kolab::log('Y', "Skipping calendar creation for $user\@$domain as $calendar is a default calendar.", KOLAB_DEBUG);
+ } else {
+ Kolab::log('Y', "Creating default calendar for $user\@$domain.", KOLAB_DEBUG);
+ createMailbox($cyrus, $folder, 0);
+ setFolderType($cyrus, $folder, 0, 'event.default');
+ setACL($cyrus, $folder, 0, $acl);
+ Kolab::log('Y', "Successfully created default calendar for $user\@$domain.", KOLAB_DEBUG);
+ }
+}
+
sub setQuota
{
my $cyrus = shift;
diff --git a/perl-kolab/lib/Kolab/LDAP.pm b/perl-kolab/lib/Kolab/LDAP.pm
index e554c16..7fcb16b 100644
--- a/perl-kolab/lib/Kolab/LDAP.pm
+++ b/perl-kolab/lib/Kolab/LDAP.pm
@@ -557,9 +557,7 @@ sub createObject
$domain = $Kolab::config{'postfix-mydomain'};
}
my $folder = $user . '/Calendar@' . $domain;
- Kolab::Cyrus::createMailbox($cyrus, $folder, 0);
- Kolab::Cyrus::setFolderType($cyrus, $folder, 0, 'event.default');
- Kolab::Cyrus::setACL($cyrus, $folder, 0, ["$uid all", 'calendar@' . $domain .' all']);
+ Kolab::Cyrus::createCalendar($cyrus, $user, $domain, $folder, ["$uid all", 'calendar@' . $domain .' all']);
}
}
}
diff --git a/release-notes.txt b/release-notes.txt
index 748dc83..4781263 100644
--- a/release-notes.txt
+++ b/release-notes.txt
@@ -64,8 +64,13 @@ Changes between 2.2.3 and 2.2.x:
- imapd-2.3.13-20081020_kolab?
- kolab/issue1141 (Cannot give users from other domains access to a folder (rt#5747))
+ kolab/issue1141 (Cannot give users from other domains access
+ to a folder (rt#5747))
+ - perl-kolab-2.2.3-20091217
+
+ kolab/issue4237 (additional event.default folder created by
+ kolabd (rt#6038))
Changes between 2.2.2 and 2.2.3: