Code

Added acl fix for departments too.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Feb 2007 07:54:34 +0000 (07:54 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Feb 2007 07:54:34 +0000 (07:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5680 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc
plugins/admin/departments/class_departmentGeneric.inc

index 0b50f3fd348f4b78cb36d43647f3049b42480185..3b8508967df9692daba2b6a74a42363ccfb7b238 100644 (file)
@@ -1514,7 +1514,7 @@ class plugin
    *  $old_dn   specifies the actually used dn
    *  $new_dn   specifies the destiantion dn
    */
-  function update_acls($old_dn,$new_dn)
+  function update_acls($old_dn,$new_dn,$output_changes = FALSE)
   {
     global $config;
 
@@ -1582,8 +1582,9 @@ class plugin
        /* Acls for this object must be adjusted */
         if($found){
 
-          echo "Changing ACL dn from : <br>&nbsp;-&nbsp;<b>&nbsp;to".$old_dn."</b><br>&nbsp;-&nbsp;<b>".$new_dn."</b><br>";
-
+          if($output_changes){
+            echo "<font color='green'>Changing ACL dn from : <br>&nbsp;-&nbsp;<b>&nbsp;to".$old_dn."</b><br>&nbsp;-&nbsp;<b>".$new_dn."</b></font><br>";
+          }
           $update[$attrs['dn']] =array();
           foreach($acls as $acl){
             $update[$attrs['dn']]['gosaAclEntry'][] = $acl;
index 3efe8f8fdb27b8400285e58450d0c8d2f8cb3680..31713217b577e5c299f9a8765639f480b99c327e 100644 (file)
@@ -541,6 +541,8 @@ class department extends plugin
 
                                echo "<b>"._("Object").":</b> ".@LDAP::fix($src)."<br>";
 
+        $this->update_acls($object, $dst,TRUE);
+
                                if (!$this->copy($src, $dst)){
                                        echo "<font color='#FF0000'><br>".sprintf(_("FAILED to copy %s, aborting operation"),@LDAP::fix($src))."</font>";
                                        return (FALSE);