diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
index 6fd1cb24754c7e8b52d97c66df06b582115768b4..978bc0c87f4f8284b4ff00386eb5dce4f18a3fc4 100644 (file)
var $start_pasting_copied_objects = FALSE;
var $dns = array();
+ var $acl_module = array("ogroups");
function ogroupManagement (&$config, $dn= NULL)
{
/* Copy & Paste enabled ?
*/
- if((isset($this->config->data['MAIN']['ENABLECOPYPASTE']))&&(preg_match("/true/i",$this->config->data['MAIN']['ENABLECOPYPASTE'] ))){
+ if ($this->config->get_cfg_value("copyPaste") == "true"){
$this->CopyPasteHandler = new CopyPasteHandler($this->config);
}
/* Check if there is a snapshot dialog open */
$base = $this->DivListOGroup->selectedBase;
- if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){
+ if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases(),$this)){
return($str);
}
/* Return departments, that will be included within snapshot detection */
function get_used_snapshot_bases()
{
- return(array(get_ou('ogroupou').$this->DivListOGroup->selectedBase));
+ return(array(get_ou('ogroupRDN').$this->DivListOGroup->selectedBase));
}
$filter= "(&(cn=$Regex)(objectClass=gosaGroupOfNames)(|$filter))";
if($this->DivListOGroup->SubSearch){
- $res= get_sub_list($filter, "ogroups",get_ou('ogroupou'), $base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT | GL_SUBSEARCH);
+ $res= get_sub_list($filter, "ogroups",get_ou('ogroupRDN'), $base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT | GL_SUBSEARCH);
}else{
- $res= get_sub_list($filter, "ogroups",get_ou('ogroupou'), get_ou('ogroupou').$base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT );
+ $res= get_sub_list($filter, "ogroups",get_ou('ogroupRDN'), get_ou('ogroupRDN').$base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT );
}
$this->ogrouplist= $res;
/* Cleanup object queue */
$this->CopyPasteHandler->cleanup_queue();
$dn = $this->ogrouplist[$s_entry]['dn'];
- if($s_action == "copy" && preg_match("/r/",$ui->has_complete_category_acls($dn,"ogroups"))){
- $this->CopyPasteHandler->add_to_queue($dn,$s_action, "ogrouptabs","OGROUPTABS","ogroups");
+ if($s_action == "copy" && $ui->is_copyable($dn,"ogroups","ogroup")){
+ $this->CopyPasteHandler->add_to_queue($dn,$s_action,"ogrouptabs","OGROUPTABS","ogroups");
}
- if($s_action == "cut" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"ogroups"))){
+ if($s_action == "cut" && $ui->is_cutable($dn,"ogroups","ogroup")){
$this->CopyPasteHandler->add_to_queue($dn,$s_action,"ogrouptabs","OGROUPTABS","ogroups");
}
}
foreach($this->list_get_selected_items() as $id){
$dn = $this->ogrouplist[$id]['dn'];
- if($s_action == "copy_multiple" && preg_match("/r/",$ui->has_complete_category_acls($dn,"ogroups"))){
+ if($s_action == "copy_multiple" && $ui->is_copyable($dn,"ogroups","ogroup")){
$this->CopyPasteHandler->add_to_queue($dn,"copy","ogrouptabs","OGROUPTABS","ogroups");
}
- if($s_action == "cut_multiple" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"ogroups"))){
+ if($s_action == "cut_multiple" && $ui->is_cutable($dn,"ogroups","ogroup")){
$this->CopyPasteHandler->add_to_queue($dn,"cut","ogrouptabs","OGROUPTABS","ogroups");
}
}
if($this->start_pasting_copied_objects && $this->CopyPasteHandler->entries_queued()){
/* Get dialog */
- $data = $this->CopyPasteHandler->execute();
$this->CopyPasteHandler->SetVar("base",$this->DivListOGroup->selectedBase);
+ $data = $this->CopyPasteHandler->execute();
/* Return dialog data */
if(!empty($data)){