From: hickert Date: Mon, 18 Sep 2006 10:58:14 +0000 (+0000) Subject: Updated Workstation acls X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2adc1fb853545aa2b457dcb03bf8deaa3fb33fe1;p=gosa.git Updated Workstation acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4711 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/smarty/plugins/block.render.php b/include/smarty/plugins/block.render.php index efca60e7d..1f3dbf285 100755 --- a/include/smarty/plugins/block.render.php +++ b/include/smarty/plugins/block.render.php @@ -21,7 +21,7 @@ function smarty_block_render($params, $text, &$smarty) } /* Disable objects, but keep those active that have mode=read_active */ - if(!(isset($params['mode']) && $params['mode']=='readable')){ + if(!(isset($params['mode']) && $params['mode']=='read_active')){ /* Disable options && greyout divlists */ diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 1e107aa93..0d4312b48 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -835,7 +835,7 @@ class printgeneric extends plugin "plPriority" => 0, "plSection" => array("administration"), "plCategory" => array("printer" => array("description" => _("Printer"), - "objectClass" => "gotoPrinter")), + "objectClass" => "gotoPrinter"),"workstation"), "plProvidedAcls"=> array( "cn" => _("Name"), "base" => _("Base") , diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 4c25e5fb8..86e394bb8 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -130,11 +130,15 @@ class workgeneric extends plugin plugin::execute(); /* Do we need to flip is_account state? */ - if (isset($_POST['modify_state'])){ - $this->is_account= !$this->is_account; + if(isset($_POST['modify_state'])){ + if($this->is_account && $this->acl_is_removeable()){ + $this->is_account= FALSE; + }elseif(!$this->is_account && $this->acl_is_createable()){ + $this->is_account= TRUE; + } } - if (isset($_POST['action'])){ + if ((isset($_POST['action'])) && ($this->acl_is_writeable("FAIstate"))){ $cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD"); if ($cmd == ""){ print_red(_("No ACTIONCMD definition found in your gosa.conf")); @@ -188,7 +192,7 @@ class workgeneric extends plugin /* Base select dialog */ $once = true; foreach($_POST as $name => $value){ - if(preg_match("/^chooseBase/",$name) && $once){ + if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_writeable("base")){ $once = false; $this->dialog = new baseSelectDialog($this->config,$this); $this->dialog->setCurrentBase($this->base); @@ -211,12 +215,12 @@ class workgeneric extends plugin } /* Add new ntp Server to our list */ - if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers']))){ + if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && $this->acl_is_writeable("gotoNtpServer")){ $this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers']; } /* Delete selected NtpServer for list of used servers */ - if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected']))){ + if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected'])) && $this->acl_is_writeable("gotoNtpServer")){ foreach($_POST['gotoNtpServerSelected'] as $name){ unset($this->gotoNtpServer[$name]); } diff --git a/plugins/admin/systems/tabs_workstation.inc b/plugins/admin/systems/tabs_workstation.inc index e7f7d0a33..d5bab394b 100644 --- a/plugins/admin/systems/tabs_workstation.inc +++ b/plugins/admin/systems/tabs_workstation.inc @@ -14,10 +14,12 @@ class worktabs extends tabs $this->by_name[$tab['CLASS']]= $tab['NAME']; $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn,$this); $this->by_object[$tab['CLASS']]->parent= &$this; + $this->by_object[$tab['CLASS']]->set_acl_category($category); }else{ $this->by_name[$tab['CLASS']]= $tab['NAME']; $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn); $this->by_object[$tab['CLASS']]->parent= &$this; + $this->by_object[$tab['CLASS']]->set_acl_category($category); } /* Initialize current */ if ($this->current == ""){ diff --git a/plugins/admin/systems/workstation.tpl b/plugins/admin/systems/workstation.tpl index 6167c98cb..317d7e219 100644 --- a/plugins/admin/systems/workstation.tpl +++ b/plugins/admin/systems/workstation.tpl @@ -58,7 +58,7 @@
-{render acl=gotoNtpServerACL} +{render acl=$gotoNtpServerACL}