diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc
index a3c271d40f78d016699967bc063ded0e87735e6a..7b3f750f66d8280fd19d17f332e75cfd202efd1d 100644 (file)
var $dn ="";
var $dns = array();
+ var $acl_module = array("devices");
+
function deviceManagement(&$config, $dn= NULL)
{
plugin::plugin ($config, $dn);
/* Check if there is a snapshot dialog open */
$base = $this->DivListDevices->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("");
}
+ $ui = get_userinfo();
+
/* Add a single entry to queue */
if($s_action == "cut" || $s_action == "copy"){
/* Cleanup object queue */
$this->CopyPasteHandler->cleanup_queue();
$dn = $this->devices[$s_entry]['dn'];
- if($s_action == "copy" && preg_match("/r/",$ui->has_complete_category_acls($dn,"devices"))){
+ if($s_action == "copy" && $ui->is_copyable($dn,"devices","deviceGeneric")){
$this->CopyPasteHandler->add_to_queue($dn,$s_action,"devicetabs","DEVICETABS","devices");
}
- if($s_action == "cut" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"devices"))){
+ if($s_action == "cut" && $ui->is_cutable($dn,"devices","deviceGeneric")){
$this->CopyPasteHandler->add_to_queue($dn,$s_action,"devicetabs","DEVICETABS","devices");
}
}
foreach($this->list_get_selected_items() as $id){
$dn = $this->devices[$id]['dn'];
- if($s_action == "copy_multiple" && preg_match("/r/",$ui->has_complete_category_acls($dn,"devices"))){
+ if($s_action == "copy_multiple" && $ui->is_copyable($dn,"devices","deviceGeneric")){
$this->CopyPasteHandler->add_to_queue($dn,"copy","devicetabs","DEVICETABS","devices");
}
- if($s_action == "cut_multiple" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"devices"))){
+ if($s_action == "cut_multiple" && $ui->is_cutable($dn,"devices","deviceGeneric")){
$this->CopyPasteHandler->add_to_queue($dn,"cut","devicetabs","DEVICETABS","devices");
}
}
if($this->start_pasting_copied_objects && $this->CopyPasteHandler->entries_queued()){
/* Get dialog */
- $data = $this->CopyPasteHandler->execute();
$this->CopyPasteHandler->SetVar("base",$this->DivListDevices->selectedBase);
+ $data = $this->CopyPasteHandler->execute();
/* Return dialog data */
if(!empty($data)){