summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f21642d)
raw | patch | inline | side by side (parent: f21642d)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Aug 2005 19:17:38 +0000 (19:17 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Aug 2005 19:17:38 +0000 (19:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1102 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_mail-methods-kolab.inc | patch | blob | history |
index 346e75a07d17df563554ec82d9e8ea079e9eb02f..98fea37efb740521155b75e050ad3ff5ceb08cab 100644 (file)
return (TRUE);
}
- function setSharedFolderPermissions($folder, $permissions)
- {
- }
function deleteMailbox($folder)
{
unset ($mailObject->attrs[$source]);
}
}
- // without this line gosaMailQuota is in MB instead of KB
- if(isset($mailObject->attrs['gosaMailQuota'][0])){
- $mailObject->gosaMailQuota=$mailObject->attrs['gosaMailQuota'][0];
- }
-
-
/* Adjust server name if needed */
foreach ($mailObject->config->data['SERVERS']['IMAP'] as $srv => $dummy){
}
$objectclasses= array();
foreach ($mailObject->attrs['objectClass'] as $oc){
- if ($oc != 'kolabInetOrgPerson'){
+ if ($oc != 'kolabInetOrgPerson' && $oc != 'kolabSharedFolder'){
$objectclasses[]= $oc;
}
}
-
- $mailObject->attrs['gosaMailQuota'] = ( $mailObject->gosaMailQuota/1024);
-
$mailObject->attrs['objectClass']= $objectclasses;
- $mailObject->attrs['objectClass'][]= 'kolabInetOrgPerson';
+ if (in_array("posixGroup", $mailObject->attrs['objectClass'])){
+ $mailObject->attrs['objectClass'][]= 'kolabSharedFolder';
+
+ /* Work on acl attribute */
+ $new_acl= array();
+ foreach ($mailObject->attrs['acl'] as $uacl){
+ list($user, $acl) = split(" ", $uacl);
+ if ($user != "%members%"){
+ $new_acl[$user]= $uacl;
+ } else {
+ foreach ($mailObject->members as $member){
+ $new_acl[$member]= "$member $acl";
+ }
+ }
+ }
+ $mailObject->attrs['acl']= array();
+ foreach ($new_acl as $key => $value){
+ $mailObject->attrs['acl'][]= $value;
+ }
+ } else {
+ $mailObject->attrs['objectClass'][]= 'kolabInetOrgPerson';
+ }
/* Remove imap:// tagging */
$mailObject->attrs['kolabHomeServer']= preg_replace('%imap://%', '', $mailObject->attrs['kolabHomeServer']);