summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d593ef0)
raw | patch | inline | side by side (parent: d593ef0)
author | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 25 Nov 2010 11:47:03 +0000 (11:47 +0000) | ||
committer | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 25 Nov 2010 11:47:03 +0000 (11:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20369 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 72b6a64da3673e36bf143360b3dbb9422d43c59c..b517c3c3a71e61b5613e3e24608c9d0fe518e28b 100644 (file)
// Save the primary Email Address.
if($this->isFeatureEnabled("primaryMail")&& $this->hasFeaturebeenChanged("primaryMail")){
- echo "------MailAddress to be saved: ".$this->mailAddress."<br>";
+
$res = $this->groupwareDao->save("primaryMail", $this->uid, $this->mailAddress);
if($res === NULL){
$message = _("Setting account mail address failed!");
$res = $this->groupwareDao->save("alternateAddresses", $this->uid, array($this->alternateAddresses));
}
else{
- echo "deleting AltAddresses.";
+
$res = $this->groupwareDao->save("alternateAddresses", $this->uid, array(array()));
}
if($res === NULL){
unset($this->mailFolderChanges["user/".$this->uid]);
foreach($this->mailFolderChanges as $folder => $memberlist){
- echo "Status: ".$this->mailFolderChanges[$folder]["status"]."<br>";
if($this->mailFolderChanges[$folder]["status"] == "added"){
$this->groupwareDao->save("mailFolder", $folder);
}
}
else{
+ //Todo: remove debugs
+ /*
echo "--- Hello1";
print_a($memberlist["acls"]);
echo "--- Hello2";
print_a($this->mailFolderChanges[$folder]["acls"]);
-
+ */
if(array_differs($memberlist["acls"], $this->mailFolder[$folder]["acls"])){
//append all mebers set in Gosa widget.
echo "ACLs have changed.";
}
}
if(!empty($memberListToBeSaved)){
+ //Todo: remove debugs
+ /*
echo "List To save:<pre>";
print_r($memberListToBeSaved);
echo "</pre><br>";
+ */
$this->groupwareDao->save("folderACLs", $folder, array($memberListToBeSaved));
}
}
diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc
index a5c5e6f4f6ecfaa36e0f31ef648f9cf00988b98d..dce2a25441f00f6c9643f3102ff6d1bc1fdb2c4c 100644 (file)
*/
private function translateGwAclsToGosaAcls($compFolders){
$resultArr = array();
- $folderAclDef = GroupwareDefinitions::getPermissions();
foreach ($compFolders as $fName => $fMembers) {
$resultArr[$fName]["name"] = preg_replace("/^.*\//","",$fName);
$resultArr[$fName]["status"] = "";
+ $resultArr[$fName]["acls"] = array();
foreach($fMembers as $fMember => $fAcl){
$aclLine = array(
"name" => $fMember,
$aclLine["acl"] = GROUPWARE_RIGHTS_NONE;
}
else{
- $resultArr[$fName]["acls"] = $folderAclDef[$fAcl];
+ $aclLine["acl"] = $fAcl;
+
}
$resultArr[$fName]["acls"][] = $aclLine;
}
diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDefinitions.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDefinitions.inc
index 4cfd0225f04d632106e91dd5ed10a71ebe90bbbb..963e1103a5feb268dfcf3a7988d75651d5fee94e 100644 (file)
{
public static function getPermissions()
{
- $ret[GROUPWARE_RIGHTS_NONE] = _("None");
- $ret[RIGHTS_GROUPWARE_READ] = _("Read");
- $ret[RIGHTS_GROUPWARE_POST] = _("Post");
- $ret[GROUPWARE_RIGHTS_APPEND] = _("Append");
- $ret[RIGHTS_GROUPWARE_WRITE] = _("Write");
- $ret[GROUPWARE_RIGHTS_ALL] = _("All");
+ $ret[GROUPWARE_RIGHTS_NONE] = _("no right");
+ $ret[RIGHTS_GROUPWARE_READ] = _("read right");
+ $ret[RIGHTS_GROUPWARE_POST] = _("post right");
+ $ret[GROUPWARE_RIGHTS_APPEND] = _("append right");
+ $ret[RIGHTS_GROUPWARE_WRITE] = _("write right");
+ $ret[GROUPWARE_RIGHTS_ALL] = _("all rights");
+
+ $ret[GROUPWARE_LOOKUP] = _("lookup right");
+ $ret[GROUPWARE_READ] = _("atomic read right");
+ $ret[GROUPWARE_STATUS] = _("atomic status right");
+ $ret[GROUPWARE_WRITE] = _("atomic write right");
+ $ret[GROUPWARE_INSERT] = _("atomic insert right");
+ $ret[GROUPWARE_POST] = _("atomic post right");
+ $ret[GROUPWARE_CREATE] = _("atomic create right");
+ $ret[GROUPWARE_DELETE] = _("atomic delete right");
+ $ret[GROUPWARE_ADMINISTRATE] = _("atomic admin right");
+
+ //$ret[GROUPWARE_RIGHTS_NONE", 0);
+ //$ret[RIGHTS_GROUPWARE_READ", GROUPWARE_LOOKUP | GROUPWARE_READ | GROUPWARE_STATUS);
+ //$ret[RIGHTS_GROUPWARE_POST", RIGHTS_GROUPWARE_READ | GROUPWARE_POST);
+ //$ret[GROUPWARE_RIGHTS_APPEND", RIGHTS_GROUPWARE_POST | GROUPWARE_INSERT);
+ //$ret[RIGHTS_GROUPWARE_WRITE", GROUPWARE_RIGHTS_APPEND | GROUPWARE_WRITE | GROUPWARE_CREATE | GROUPWARE_DELETE);
+ //$ret[GROUPWARE_RIGHTS_ALL"
+
return($ret);
}
public static function getDefaultFolderACLs()
- {
+ {
+ $r = array();
$r["Anonym"] = GROUPWARE_RIGHTS_NONE;
$r["Standard"] = GROUPWARE_RIGHTS_NONE;