summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: abaa37a)
raw | patch | inline | side by side (parent: abaa37a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Aug 2008 09:55:03 +0000 (09:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Aug 2008 09:55:03 +0000 (09:55 +0000) |
-Some errors fixed.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12257 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12257 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_divListSystem.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/class_systemManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc
index b78fc8cc793ad507e33b9df6a83a1bf047ac9577..54529f658b0c16160d3427f605c56b4669ae1fad 100644 (file)
/* ACL mapping */
$ui = get_userinfo();
- $tabs = array(
- "terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal/termgeneric"),
- "workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation/workgeneric"),
- "server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server/servgeneric"),
- "printer" => array("CLASS"=>"PRINTTABS", "TABCLASS" =>"printtabs", "ACL"=> "printer/printgeneric"),
- "phone" => array("CLASS"=>"PHONETABS", "TABCLASS" =>"phonetabs", "ACL"=> "phone/phoneGeneric"),
- "winstation" => array("CLASS"=>"WINTABS", "TABCLASS" =>"wintabs", "ACL"=> "winworkstation/wingeneric"),
- "incoming" => array("CLASS"=>"", "TABCLASS" =>"", "ACL"=> "incoming/systems"),
- "component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component/componentGeneric"));
-
+ $tabs = $this->parent->get_tab_defs();
$cnts = array("component" => 0 , "terminal" => 0 , "workstation" => 0 ,
- "printer" => 0 , "phone" => 0 , "server" => 0,
+ "printer" => 0 , "phone" => 0 , "server" => 0,"opsi_client" => 0,
"NewDevice" => 0, "winstation"=> 0);
-
/* Get list of all objectGroups and their member and release configuration
*/
$ogroups = array();
/* Get system type, it is used to fetch the acls for the current object.
"winstation" acls are stored as 2winworkstation", so we have to map this here */
- $type = $this->parent->get_system_type($val);
- if($type == "winstation") {
- $acl_type = "winworkstation";
- }else{
- $acl_type = $type;
- }
/* Map NewDevice acls to workstation acls */
+ $type = $this->parent->get_system_type($val);
if($type == "NewDevice" || $type == "ArpNewDevice"){
$type = "incoming";
- $acl_type = "incoming";
}
-
+ $acl_type = $tabs[$type]['ACLC'];
$s_acl = $tabs[$type]['ACL'];
$category = preg_replace("/\/.*$/","",$s_acl);
$class = preg_replace("/^.*\//","",$s_acl);
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index d08dce0ffd8a9affed7ded4da5655e6d32594c57..4372472751fb112fdce25d64b324099391d6322c 100644 (file)
/* Possible destination system types
*/
- $tabs = array(
- "terminal" => array("CLASS"=>"TERMTABS", "TABNAME"=>"termgeneric",
- "TABCLASS" =>"termtabs", "ACL"=> "terminal"),
- "workstation" => array("CLASS"=>"WORKTABS", "TABNAME"=>"workgeneric",
- "TABCLASS" =>"worktabs", "ACL"=> "workstation"),
- "server" => array("CLASS"=>"SERVTABS", "TABNAME"=>"servgeneric",
- "TABCLASS" =>"servtabs", "ACL"=> "server"));
+ $tabs = $this->get_tab_defs();
/* Remember dialog selection.
*/
$class = $tabs[$selected_system]["CLASS"];
$tabname = $tabs[$selected_system]["TABNAME"];
$tabclass = $tabs[$selected_system]["TABCLASS"];
- $acl_cat = $tabs[$selected_system]["ACL"];
+ $acl_cat = $tabs[$selected_system]["ACLC"];
if(!class_available($tabclass)){
}
$this->dn= "new";
- $tabs = array(
- "terminal" => array("CLASS"=>"TERMTABS", "TABNAME"=>"termgeneric", "TABCLASS" =>"termtabs", "ACL"=> "terminal"),
- "workstation" => array("CLASS"=>"WORKTABS", "TABNAME"=>"workgeneric", "TABCLASS" =>"worktabs", "ACL"=> "workstation"),
- "server" => array("CLASS"=>"SERVTABS", "TABNAME"=>"servgeneric", "TABCLASS" =>"servtabs", "ACL"=> "server"),
- "printer" => array("CLASS"=>"PRINTTABS", "TABNAME"=>"printgeneric", "TABCLASS" =>"printtabs", "ACL"=> "printer"),
- "phone" => array("CLASS"=>"PHONETABS", "TABNAME"=>"phoneGeneric", "TABCLASS" =>"phonetabs", "ACL"=> "phone"),
- "component" => array("CLASS"=>"COMPONENTTABS","TABNAME"=>"componentGeneric","TABCLASS" =>"componenttabs", "ACL"=> "component"));
+ $tabs = $this->get_tab_defs();
if(isset($tabs[$sw])){
$class = $tabs[$sw]["CLASS"];
$tabname = $tabs[$sw]["TABNAME"];
$tabclass = $tabs[$sw]["TABCLASS"];
- $acl_cat = $tabs[$sw]["ACL"];
+ $acl_cat = $tabs[$sw]["ACLC"];
/* Load permissions for selected 'dn' and check if
we're allowed to remove this 'dn' */
/* Lock the current entry, so everyone will get the
above dialog */
- $tabs = array(
- "gosa_opsi_client"=> array("CLASS"=>"OPSITABS", "TABCLASS" =>"opsi_tabs", "ACL"=> "opsi"),
- "terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal"),
- "workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation"),
- "server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server"),
- "printer" => array("CLASS"=>"PRINTTABS", "TABCLASS" =>"printtabs", "ACL"=> "printer"),
- "phone" => array("CLASS"=>"PHONETABS", "TABCLASS" =>"phonetabs", "ACL"=> "phone"),
- "winstation" => array("CLASS"=>"WINTABS", "TABCLASS" =>"wintabs", "ACL"=> "winworkstation"),
- "component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component"));
+ $tabs = $this->get_tab_defs();
if($type == "ArpNewDevice"){
if(!class_available("ArpNewDeviceTabs")){
}elseif(isset($tabs[$type])){
$class = $tabs[$type]["CLASS"];
- $acl_cat = $tabs[$type]["ACL"];
+ $acl_cat = $tabs[$type]["ACLC"];
$tabclass = $tabs[$type]["TABCLASS"];
if(!class_available($tabclass)){
/* Set terminals root password */
if ($s_action=="change_pw"){
- $tabs = array(
- "ArpNewDevice"=> array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
- "NewDevice" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
- "terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal/termgeneric"),
- "workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation/workgeneric"),
- "server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server/servgeneric"),
- "printer" => array("CLASS"=>"PRINTTABS", "TABCLASS" =>"printtabs", "ACL"=> "printer/printgeneric"),
- "phone" => array("CLASS"=>"PHONETABS", "TABCLASS" =>"phonetabs", "ACL"=> "phone/phoneGeneric"),
- "winstation" => array("CLASS"=>"WINTABS", "TABCLASS" =>"wintabs", "ACL"=> "winworkstation/wingeneric"),
- "component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component/componentGeneric"));
+ $tabs = $this->get_tab_defs();
$dn = $this->terminals[$s_entry]['dn'];
$type = $this->get_system_type($this->terminals[$s_entry]);
$_POST['new_password'] == $_POST['repeated_password']){
/* Check if user is allowed to set password */
- $tabs = array(
- "terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal/termgeneric" ,"PLUG"=>"termgeneric"),
- "workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation/workgeneric" ,"PLUG"=>"workgeneric"),
- "server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server/servgeneric" ,"PLUG"=>"servgeneric"),
- "component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component/componentGeneric","PLUG"=>"componentGeneric"));
+ $tabs = $this->get_tab_defs();
- /* Detect object type */
$type = "";
foreach($this->terminals as $terminal){
if($terminal['dn'] == $this->dn){
}
$ui = get_userinfo();
- $tabs = array(
- "ArpNewDevice"=> array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
- "NewDevice" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
- "terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal/termgeneric"),
- "workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation/workgeneric"),
- "server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server/servgeneric"),
- "printer" => array("CLASS"=>"PRINTTABS", "TABCLASS" =>"printtabs", "ACL"=> "printer/printgeneric"),
- "phone" => array("CLASS"=>"PHONETABS", "TABCLASS" =>"phonetabs", "ACL"=> "phone/phoneGeneric"),
- "winstation" => array("CLASS"=>"WINTABS", "TABCLASS" =>"wintabs", "ACL"=> "winworkstation/wingeneric"),
- "component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component/componentGeneric"));
-
+ $tabs = $this->get_tab_defs();
if(count($ids)){
if (isset($_POST['delete_multiple_system_confirm'])){
$ui = get_userinfo();
- $tabs = array(
- "ArpNewDevice"=> array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
- "NewDevice" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "incoming/systems"),
- "terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal/termgeneric"),
- "workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation/workgeneric"),
- "server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server/servgeneric"),
- "printer" => array("CLASS"=>"PRINTTABS", "TABCLASS" =>"printtabs", "ACL"=> "printer/printgeneric"),
- "phone" => array("CLASS"=>"PHONETABS", "TABCLASS" =>"phonetabs", "ACL"=> "phone/phoneGeneric"),
- "winstation" => array("CLASS"=>"WINTABS", "TABCLASS" =>"wintabs", "ACL"=> "winworkstation/wingeneric"),
- "component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component/componentGeneric"));
-
+ $tabs = $this->get_tab_defs();
/* Remove user by user and check acls before removeing them */
foreach($this->dns as $key => $dn){
*/
if($this->opsi != NULL){
$res = array_merge($res,$this->opsi->get_hosts_for_system_management());
+ if($this->opsi->is_error()){
+ msg_dialog::display(_("Error"),msgPool::siError($this->opsi->get_error()),ERROR_DIALOG);
+ }
}
/* Get all gotoTerminal's */
/* Detect type of object and create an entry for $this->terminals */
$terminal = array();
- if (in_array_ics('gosa_opsi_client', $value["objectClass"])){
+ if (in_array_ics('opsi_client', $value["objectClass"])){
/* check acl */
$terminal = $value;
}
$ui = get_userinfo();
-
- $tabs = array(
- "terminal" => array( "CLASS" =>"TERMTABS", "TABNAME" =>"termgeneric",
- "TABCLASS" =>"termtabs", "ACL" =>"terminal"),
- "workstation" => array( "CLASS" =>"WORKTABS", "TABNAME" =>"workgeneric",
- "TABCLASS" =>"worktabs", "ACL" =>"workstation"),
- "server" => array( "CLASS" =>"SERVTABS", "TABNAME" =>"servgeneric",
- "TABCLASS" =>"servtabs", "ACL" =>"server"),
- "printer" => array( "CLASS" =>"PRINTTABS", "TABNAME" =>"printgeneric",
- "TABCLASS" =>"printtabs", "ACL" =>"printer"),
- "phone" => array( "CLASS" =>"PHONETABS", "TABNAME" =>"phoneGeneric",
- "TABCLASS" =>"phonetabs", "ACL" =>"phone"),
- "component" => array( "CLASS" =>"COMPONENTTABS","TABNAME" =>"componentGeneric",
- "TABCLASS" =>"componenttabs","ACL" =>"component"));
+
+ $tabs = $this->get_tab_defs();
/* Add a single entry to queue */
if($s_action == "cut" || $s_action == "copy"){
$tab_o = $tabs[$type]['CLASS'];
$tab_c = $tabs[$type]['TABCLASS'];
$acl_c = $tabs[$type]['TABNAME'];
- $acl = $tabs[$type]['ACL'];
+ $acl = $tabs[$type]['ACLC'];
if($s_action == "copy" && $ui->is_copyable($dn,$acl,$acl_c)){
$this->CopyPasteHandler->add_to_queue($dn,$s_action,$tab_c,$tab_o,$acl);
$tab_o = $tabs[$type]['CLASS'];
$tab_c = $tabs[$type]['TABCLASS'];
$acl_c = $tabs[$type]['TABNAME'];
- $acl = $tabs[$type]['ACL'];
+ $acl = $tabs[$type]['ACLC'];
if($s_action == "copy_multiple" && $ui->is_copyable($dn,$acl,$acl_c)){
$this->CopyPasteHandler->add_to_queue($dn,"copy",$tab_c,$tab_o,$acl);
$type= "";
if (in_array_ics('gosa_opsi_client', $classes)){
- $type= "gosa_opsi_client";
+ $type= "opsi_client";
}elseif (in_array_ics('ieee802Device', $classes)){
$type= "component";
}elseif (in_array_ics('gotoTerminal', $classes)){
if(!preg_match("/".$key[$i]."/",$input['type'])){
$found = FALSE;
}
- }
+ }
if($found){
$tmp['img'] ="<img class='center' src='".$value[0]."' alt='".$key."' title='".$value['1']."'>";
}
+ public function get_tab_defs()
+ {
+ $tabs = array(
+ "incoming" => array(
+ "CLASS" => "",
+ "TABNAME" => "",
+ "TABCLASS" => "",
+ "ACLC" => "incoming",
+ "ACL" => "incoming/systems"),
+
+ "ArpNewDevice"=> array(
+ "CLASS" => "TERMTABS",
+ "TABNAME" => "termgeneric" ,
+ "TABCLASS" => "termtabs",
+ "ACLC" => "incoming",
+ "ACL" => "incoming/systems"),
+
+ "NewDevice" => array(
+ "CLASS" => "TERMTABS",
+ "TABNAME" => "termgeneric",
+ "TABCLASS" => "termtabs",
+ "ACLC" => "incoming",
+ "ACL" => "incoming/systems"),
+
+ "terminal" => array(
+ "CLASS" => "TERMTABS",
+ "TABNAME" => "termgeneric",
+ "TABCLASS" => "termtabs",
+ "ACLC" => "terminal",
+ "ACL" => "terminal/termgeneric"),
+
+ "workstation" => array(
+ "CLASS" => "WORKTABS",
+ "TABNAME" => "workgeneric",
+ "TABCLASS"=> "worktabs",
+ "ACLC" => "workstation",
+ "ACL" => "workstation/workgeneric" ),
+
+ "server" => array(
+ "CLASS" => "SERVTABS",
+ "TABNAME" => "servgeneric",
+ "TABCLASS"=> "servtabs",
+ "ACLC" => "server",
+ "ACL" => "server/servgeneric"),
+
+ "printer" => array(
+ "CLASS" => "PRINTTABS",
+ "TABNAME" => "printgeneric",
+ "TABCLASS"=> "printtabs",
+ "ACLC" => "printer",
+ "ACL" => "printer/printgeneric"),
+
+ "phone" => array(
+ "CLASS" => "PHONETABS",
+ "TABNAME" => "phoneGeneric",
+ "TABCLASS"=> "phonetabs",
+ "ACLC" => "phone",
+ "ACL" => "phone/phoneGeneric"),
+
+ "winstation" => array(
+ "CLASS" => "WINTABS",
+ "TABNAME" => "wingeneric",
+ "TABCLASS"=> "wintabs",
+ "ACLC" => "winworkstation",
+ "ACL" => "winworkstation/wingeneric"),
+
+ "component" => array(
+ "CLASS" => "COMPONENTTABS",
+ "TABNAME" => "componentGeneric",
+ "TABCLASS"=> "componenttabs",
+ "ACLC" => "component",
+ "ACL" => "component/componentGeneric"));
+
+ if($this->opsi != NULL){
+ $tabs["opsi_client"] = array(
+ "CLASS" => "OPSITABS",
+ "TABNAME" => "opsi_generic" ,
+ "TABCLASS"=> "opsi_tabs",
+ "ACLC" => "opsi" ,
+ "ACL" => "opsi/opsi_generic");
+ }
+
+ return($tabs);
+ }
+
+
+
/* !! Incoming dummy acls, required to defined acls for incoming objects
*/
static function plInfo()