summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b918ec3)
raw | patch | inline | side by side (parent: b918ec3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 9 Dec 2008 11:52:08 +0000 (11:52 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 9 Dec 2008 11:52:08 +0000 (11:52 +0000) |
-Ensure that GOsa keep unknown ACL settings.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13202 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13202 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab22.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab22.inc
index 6b78f4653c3f92442cf62c50c082a38e2cb7eb76..19835b188f863448c6eff7857c790016f5b7f6a3 100644 (file)
{
return(array("gonicus.de"));
}
-
-
- /*! \brief Returns a list of all possible acls.
- @return Array ACLs.
- */
- public function getAclTypes()
- {
- $acls["lrsw"] = _("read");
- $acls["lrswp"] = _("post");
- $acls["p"] = _("external post");
- $acls["lrswip"] = _("append");
- $acls["lrswipcd"] = _("write");
- $acls["lrswipcda"]= _("admin");
- $acls["lrswipkxtecda"]= _("super-admin");
- $acls[" "]= _("none");
- return($acls);
- }
}
diff --git a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc
index 557537538018df33b001ed23116e26142efdc181..c829a64e899ac8abadf99dccbaf20d97a0da7fe1 100644 (file)
$this->mailMethod->fixAttributesOnLoad();
$this->mailDomainParts = $this->mailMethod->getMailDomains();
$this->AvailableFolderTypes = $this->mailMethod->getAvailableFolderTypes();
- $this->AclTypes = $this->mailMethod->getAclTypes();
$this->MailBoxes = array();
/* Remember account status
/* Disconnect mailMethod. Connect on demand later.
*/
$this->mailMethod->disconnect();
+ $this->AclTypes = $this->mailMethod->getAclTypes();
/* Summarize most used ACLs as member acl
*/
diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc
index 147a5d1f49cf1aba372d6de11ee6106f470d8b8b..5f958c9304229fb9b9a02cb455e10b6f78ed3118 100644 (file)
$folder_acls[$user] = $acl;
}
+ /* Merge given ACL with acl mapping
+ This ensures that no ACL will accidentally overwritten by gosa.
+ */
+ foreach($folder_acls as $user => $acl){
+ if(!isset($this->acl_mapping[$acl])){
+ $this->acl_mapping[$acl] = $acl;
+ }
+ }
+
return($folder_acls);
}
diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods.inc b/gosa-plugins/mail/personal/mail/class_mail-methods.inc
index 3d5698a947041a7f81bbc4530ff7bf6ba5d8fa8d..7490d8c3fc2fdefcbc142d8f76f931d10554bdbc 100644 (file)
protected $error = "";
protected $parent = NULL;
protected $MailServer = "";
+
+
+ protected $acl_map = array(
+ "lrsw" => "read",
+ "lrswp" => "post",
+ "p" => "external post",
+ "lrswip" => "append",
+ "lrswipcd" => "write",
+ "lrswipcda"=> "admin",
+ " " => "none");
+
+ protected $acl_mapping = array();
/*! \brief Constructs the mail class
sprintf(_("The configured mail attribute '%s' is unsupported!"), $new_uattrib), ERROR_DIALOG);
}
}
+
+ /* Create ACL map */
+ foreach($this->acl_map as $acl => $name){
+ $this->acl_mapping[$acl] = _($name);
+ }
+
$this->build_account_id();
$this->initial_account_id = $this->account_id;
}
public function getAvailableFolderTypes()
{
$ret = array();
- $ret['CAT']['mail'] = _("Mail");
- $ret['CAT']['peter']= _("User");
- $ret['SUB_CAT']['mail']['a'] = "a";
- $ret['SUB_CAT']['mail']['b'] = "b";
- $ret['SUB_CAT']['peter']['tt'] = "tt";
- $ret['SUB_CAT']['peter']['dd'] = "dd";
- $ret['SUB_CAT']['peter']['did'] = "did";
+ $ret['CAT'][''] = _("None");
+ $ret['SUB_CAT'][''][''] = _("None");
return($ret);
}
*/
public function getFolderType($default)
{
- if($this->enableFolderTypes && $this->parent->attrs['kolabFolderType'][0]){
- list($cat,$sub) = split("\.",$this->parent->attrs['kolabFolderType'][0]);
- return(array("CAT" => $cat, "SUB_CAT" => $sub));
- }else{
- return($default);
- }
+ return($default);
}
*/
public function setFolderType($type)
{
- $ldap = $this->config->get_ldap_link();
- $ldap->cd ($this->parent->dn);
- $ldap->modify(array("kolabFolderType" => $type['CAT'].".".$type['SUB_CAT']));
- echo "Move me to KOLAB";
+ return(TRUE) ;
}
*/
public function getFolderACLs($folder_acls)
{
+ /* Merge given ACL with acl mapping
+ This ensures that no ACL will accidentally overwritten by gosa.
+ */
+ foreach($folder_acls as $user => $acl){
+ if(!isset($this->acl_mapping[$acl])){
+ $this->acl_mapping[$acl] = $acl;
+ }
+ }
+
return($folder_acls);
}
*/
public function getAclTypes()
{
- $acls["lrsw"] = _("read");
- $acls["lrswp"] = _("post");
- $acls["p"] = _("external post");
- $acls["lrswip"] = _("append");
- $acls["lrswipcd"] = _("write");
- $acls["lrswipcda"]= _("admin");
- $acls[" "]= _("none");
- return($acls);
+ return( $this->acl_mapping);
}
public function folderTypesEnabled()