summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d462db)
raw | patch | inline | side by side (parent: 8d462db)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Nov 2007 09:06:56 +0000 (09:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Nov 2007 09:06:56 +0000 (09:06 +0000) |
-If he removes the mail extension from his account, then remove the acl entry from all sharedFolder too.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7848 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7848 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/mail/class_mailAccount.inc | patch | blob | history |
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index ba53438af09be97ebeaa4d219d8fc1ee50b6a731..5f1056d6ab9aba552727f2b9c1df72dad687885c 100644 (file)
}
}
+ /* Update shared folder membership, ACL may need to be updated */
+ $this->updateSharedFolder();
+
/* Optionally execute a command after we're done */
$this->handle_post_events("remove", array('uid'=> $this->uid));
}
$this->handle_post_events("add", array('uid'=>$this->uid));
}
+ $this->updateSharedFolder();
}
}
}
}
+
+ /* Upated shared folder ACLs
+ */
+ function updateSharedFolder()
+ {
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=posixGroup)(objectClass=gosaMailAccount)(memberUid=".$this->uid."))",array('dn','cn'));
+ if(class_exists("grouptabs")){
+ while($attrs = $ldap->fetch()){
+ $tmp = new grouptabs($this->config, $this->config->data['TABS']['GROUPTABS'], $attrs['dn']);
+ if(isset($tmp->by_object['mailgroup'])){
+ $tmp->by_object['mailgroup']->members= $tmp->by_object['group']->memberUid;
+ if(!$this->is_account){
+ $tmp->by_object['mailgroup']->removeUserAcl($this->uid);
+ $tmp->by_object['mailgroup']->removeUserAcl($this->mail);
+ }
+ $tmp->by_object['mailgroup']->save();
+ }
+ }
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: