From: hickert Date: Mon, 15 Jan 2007 04:43:14 +0000 (+0000) Subject: Some server/terminal fixes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c1b8ebc2e391971e35183ddcd5b5aae2d25e171e;p=gosa.git Some server/terminal fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5553 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDB.inc b/plugins/admin/systems/class_servDB.inc index 4d99ad42e..d7346be38 100644 --- a/plugins/admin/systems/class_servDB.inc +++ b/plugins/admin/systems/class_servDB.inc @@ -118,10 +118,13 @@ class servdb extends plugin /* Save checkbox state */ foreach ($this->additionaloc as $oc => $dummy){ - if (isset($_POST[$oc]) && $_POST[$oc] == '1'){ - $this->objectclasses[$oc]= $oc; - } else { - unset($this->objectclasses[$oc]); + + if(chkacl($this->acl,$oc) == ""){ + if (isset($_POST[$oc]) && $_POST[$oc] == '1'){ + $this->objectclasses[$oc]= $oc; + } else { + unset($this->objectclasses[$oc]); + } } } } diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index 93a05695b..9039ef077 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -79,7 +79,7 @@ class servgeneric extends plugin } /* Check for action */ - if (isset($_POST['action'])){ + if (isset($_POST['action']) && chkacl($this->acl,"FAIstate") == ""){ $cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD"); if ($cmd == ""){ print_red(_("No ACTIONCMD definition found in your gosa.conf")); diff --git a/plugins/admin/systems/class_servRepository.inc b/plugins/admin/systems/class_servRepository.inc index 1fc0458ef..50966582b 100644 --- a/plugins/admin/systems/class_servRepository.inc +++ b/plugins/admin/systems/class_servRepository.inc @@ -114,7 +114,15 @@ class servrepository extends plugin /* Do we need to flip is_account state? */ if (isset($_POST['modify_state'])){ - $this->is_account= !$this->is_account; + + /* Only change account state if allowed */ + if($this->is_account && $this->acl == "#all#"){ + $this->is_account= !$this->is_account; + $this->is_modified = true; + }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){ + $this->is_account= !$this->is_account; + $this->is_modified = true; + } } /* Show tab dialog headers */ diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc index 123348418..266c0edc3 100644 --- a/plugins/admin/systems/class_servService.inc +++ b/plugins/admin/systems/class_servService.inc @@ -145,7 +145,7 @@ class servservice extends plugin $smarty= get_smarty(); $smarty->assign("staticAddress", ""); - if((isset($_POST['DelNfsEnt']))&&(isset($_POST['goExportEntryList']))){ + if((isset($_POST['DelNfsEnt'])) && (isset($_POST['goExportEntryList'])) && chkacl($this->acl,"goExportEntry") == ""){ if($this->allow_mounts){ foreach($_POST['goExportEntryList'] as $entry){ $this->deleteFromMountList($this->goExportEntryList[$entry]); @@ -156,13 +156,13 @@ class servservice extends plugin } } - if(isset($_POST['NewNfsAdd'])){ + if(isset($_POST['NewNfsAdd']) && chkacl($this->acl,"goExportEntry") == ""){ $this->oldone = NULL; $this->o_subWindow = new servnfs($this->config,$this->acl, $this->allow_mounts, $this->dn); $this->dialog = true; } - if((isset($_POST['NewNfsEdit']))&&(isset($_POST['goExportEntryList']))){ + if((isset($_POST['NewNfsEdit']))&&(isset($_POST['goExportEntryList'])) && chkacl($this->acl,"goExportEntry") == ""){ $entry = $this->goExportEntryList[$_POST['goExportEntryList'][0]]; $add_mount=isset($this->mounts_to_add[$entry]); $this->oldone=$entry; @@ -210,13 +210,13 @@ class servservice extends plugin } /* Here we add a new entry */ - if(isset($_POST['NewNTPAdd']) && $_POST['NewNTPExport'] != "") { + if(isset($_POST['NewNTPAdd']) && $_POST['NewNTPExport'] != "" && chkacl($this->acl,"goNtpServer") == "") { $this->goTimeSource[$_POST['NewNTPExport']]= $_POST['NewNTPExport']; asort($this->goTimeSource); } /* Deleting an Entry, is a bit more complicated than adding one*/ - if(isset($_POST['DelNTPEnt'])) { + if(isset($_POST['DelNTPEnt']) && chkacl($this->acl,"goNtpServer") == "") { foreach ($_POST['goTimeSource'] as $entry){ if (isset($this->goTimeSource[$entry])){ unset($this->goTimeSource[$entry]); @@ -265,7 +265,7 @@ class servservice extends plugin $smarty->assign("goExportEntryACL", " disabled "); }else{ $smarty->assign("goShareServerState", " "); - $smarty->assign("goExportEntryACL", " "); + $smarty->assign("goExportEntryACL", chkacl($this->acl, "goExportEntry")); } /* Different handling for checkbox */ @@ -292,9 +292,9 @@ class servservice extends plugin if (isset($_POST['servicetab'])){ $tmp = $this->goTimeSource; - if(isset($_POST['goLdapBase'])){ + if(isset($_POST['goLdapBase']) && chkacl($this->acl,"goLdapBase") == ""){ $this->goLdapBase = $_POST['goLdapBase']; - } + } /* Save checkbox state */ foreach ($this->additionaloc as $oc => $dummy){ @@ -309,17 +309,21 @@ class servservice extends plugin } /* Save xdmcp is enabled flag */ - if (isset($_POST['goXdmcpIsEnabled'])){ - $this->goXdmcpIsEnabled= "true"; - } else { - $this->goXdmcpIsEnabled= "false"; + if(chkacl($this->acl,"goXdmcpIsEnabled") == ""){ + if (isset($_POST['goXdmcpIsEnabled'])){ + $this->goXdmcpIsEnabled= "true"; + } else { + $this->goXdmcpIsEnabled= "false"; + } } /* Save xdmcp is enabled flag */ - if (isset($_POST['goShareServer'])){ - $this->goShareServer = true; - } else { - $this->goShareServer = false; + if(chkacl($this->acl,"goExportEntry") == ""){ + if (isset($_POST['goShareServer'])){ + $this->goShareServer = true; + } else { + $this->goShareServer = false; + } } $this->goTimeSource = array(); $this->goTimeSource = $tmp; diff --git a/plugins/admin/systems/server.tpl b/plugins/admin/systems/server.tpl index 4c9067d4d..f4998552d 100644 --- a/plugins/admin/systems/server.tpl +++ b/plugins/admin/systems/server.tpl @@ -4,11 +4,11 @@ - + - + diff --git a/plugins/admin/systems/servservice.tpl b/plugins/admin/systems/servservice.tpl index 81729b2e0..a457f171e 100644 --- a/plugins/admin/systems/servservice.tpl +++ b/plugins/admin/systems/servservice.tpl @@ -2,7 +2,7 @@
{$must}

{$must}
-