From: hzerres Date: Fri, 29 Oct 2010 14:51:35 +0000 (+0000) Subject: (groupware) incorporated the folder and folder rights. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2785ee3ed3bad6db0c45db38146dc0db4b66f11c;p=gosa.git (groupware) incorporated the folder and folder rights. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20162 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc index 01141cd9c..3d2206dc8 100644 --- a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc @@ -241,9 +241,6 @@ class Groupware extends plugin */ function execute() { - echo "execute
";
-		print_r($_POST);
-		echo "
"; // Register plugin execution $display = plugin::execute(); @@ -318,7 +315,6 @@ class Groupware extends plugin if(!isset($folders[$this->folderPrefix])){ $folders[$this->folderPrefix] = array('name' => $this->uid,'status' => 'added','acls' => array()); } - $this->FolderWidget = new FolderWidget($this->config,$folders, $this->folderPrefix); $this->FolderWidget->setPermissions(GroupwareDefinitions::getPermissions()); $this->FolderWidget->acl_base = $this->acl_base; @@ -529,7 +525,6 @@ class Groupware extends plugin */ function save_object() { - echo "save Object"; if(isset($_POST['groupwarePluginPosted'])){ // We ran into a communication error with the backend. @@ -855,7 +850,7 @@ class Groupware extends plugin if(!$this->mailLimitSendEnabled){ $this->mailLimitSendValue = 0; } - $this->groupwareDao->save("mailLimit", $this->uid, array( "send"=>$this->mailLimitSendValue, "receive"=>$this->mailLimitReceiveValue)); + $this->groupwareDao->save("mailLimit", $this->uid, array( $this->mailLimitSendValue, $this->mailLimitReceiveValue)); } if($this->isFeatureEnabled("vacationMessage")&& $this->hasFeaturebeenChanged("vacationMessage")){ if($this->vacationEnabled){ diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc index 5b6751be4..210370fcf 100644 --- a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc +++ b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc @@ -61,7 +61,6 @@ class GroupwareDao{ "mailLimit" => array("get"=>"gwAcctGetMailLimit", "save"=>"gwAcctSetMailLimit") ); - /*! \brief Constructor sets the connection to the rpc service @@ -185,7 +184,38 @@ class GroupwareDao{ //Folder Id from the User ... //user/$id/ $resultArr["mailFolder"] = $this->get("mailFolder", array("user/".$uid."/")); - print_a($resultArr["mailFolder"]); + + foreach($resultArr["mailFolder"] as $val){ + $s = strpos($val, "user/"); + if($s == 0){ + + $resultArr["mailFolder"][$val]["name"] = substr($val, strpos($val, "/", 5)); + + $curAcl = $this->get("private_folderACLS", array("user/wiwu/Posteingang")); + if(is_array($curAcl)){ + foreach($curAcl as $aclkey => $aclval){ + + if (empty($aclkey)){ + $resultArr["mailFolder"][$val]["acls"][] = array( + "name" => $aclkey, + "acl" => aclval, + "type"=>"user"); + } + else{ + $resultArr["mailFolder"][$val]["acls"][] = array( + "name" => $aclkey, + "acl" => GROUPWARE_RIGHTS_NONE, + "type"=>"user"); + } + } + } + } + else{ + // this case should never happen - unsetting the array anyway. + unset($resultArr["mailFolder"][$val]); + } + } + /* "RIGHTS_NONE", 0); "RIGHTS_READ", LOOKUP | READ | STATUS);