steffen: server/perl-kolab/Kolab-LDAP LDAP.pm,1.1,1.2
cvs at intevation.de
cvs at intevation.de
Tue Apr 20 02:27:08 CEST 2004
Author: steffen
Update of /kolabrepository/server/perl-kolab/Kolab-LDAP
In directory doto:/tmp/cvs-serv20758/perl-kolab/Kolab-LDAP
Modified Files:
LDAP.pm
Log Message:
make shared folders work
Index: LDAP.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/Kolab-LDAP/LDAP.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- LDAP.pm 31 Mar 2004 15:36:44 -0000 1.1
+++ LDAP.pm 20 Apr 2004 00:27:05 -0000 1.2
@@ -183,6 +183,16 @@
Kolab::log('L', "Kolab::LDAP::createObject() called with obj uid field `$objuidfield' for obj type `$p'", KOLAB_DEBUG);
my $uid = trim($object->get_value($objuidfield)) || 0;
+ if( $p eq 'sf' ) {
+ # We have to create shared folders
+ # with names user.<fldrname>@<domain>
+ my @dcs = split(/,/,$object->dn());
+ my @dn;
+ while( pop( @dcs ) =~ /dc=(.*)/ ) {
+ push(@dn, $1);
+ }
+ if( $#dn > 0 ) { $uid .= '@'.join('.',reverse(@dn)); }
+ }
if (!$uid) {
Kolab::log('L', "Kolab::LDAP::createObject() called with null id attribute `$objuidfield', returning", KOLAB_DEBUG);
return;
@@ -233,7 +243,7 @@
}
my $quota = $object->get_value($Kolab::config{$p . '_field_quota'});
- Kolab::Cyrus::setQuota($cyrus, $uid, $quota);
+ Kolab::Cyrus::setQuota($cyrus, $uid, $quota, ($p eq 'sf' ? 1 : 0));
}
sub deleteObject
More information about the commits
mailing list