Code

Added copy & paste for acl roles
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Jun 2007 08:10:42 +0000 (08:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Jun 2007 08:10:42 +0000 (08:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6583 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/acl/class_aclRole.inc

index 3d4e2aba1e482378f359c96d054db6f8879ca17c..aab0e6ec10edb2454d52eb3789f345e6f7b5ee2b 100644 (file)
@@ -631,6 +631,36 @@ class aclrole extends acl
     }
   }
 
+
+  function saveCopyDialog()
+  {
+    if(isset($_POST['cn'])){
+      $this->cn = $_POST['cn'];
+    }
+  }
+  
+
+  function getCopyDialog()
+  {
+    $smarty = get_smarty();
+    $smarty->assign("cn",$this->cn);
+    $str = $smarty->fetch(get_template_path("paste_role.tpl",TRUE,dirname(__FILE__)));
+    $ret = array();
+    $ret['string'] = $str;
+    $ret['status'] = "";
+    return($ret);
+  }
+
+  
+  function PrepareForCopyPaste($source)
+  {
+    plugin::PrepareForCopyPaste($source);
+    
+    $source_o = new aclrole($this->config,$source['dn']);
+    $this->gosaAclTemplate = $source_o->gosaAclTemplate;
+  }
+  
+
   /* Return plugin informations for acl handling  */
   function plInfo()
   {