From 973f1d5db02cca18641c2b6adc7988088d58d900 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 22 Jul 2008 09:30:39 +0000 Subject: [PATCH] Updated System Startup ACLs. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11741 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/class_workstationStartup.inc | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index b89cff375..0b171df4a 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -179,7 +179,7 @@ class workstartup extends plugin } } - $this->gotoShareSelections= $config->getShareList(true); + $this->otoShareSelections= $config->getShareList(true); $this->gotoAvailableShares= $config->getShareList(false); $tmp2 = array(); @@ -319,15 +319,6 @@ class workstartup extends plugin new log("view","workstation/".get_class($this),$this->dn); } - /* Do we need to flip is_account state? */ - 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; - } - } - /* Do we represent a valid terminal? */ if (!$this->is_account && $this->parent === NULL){ $display= "\"\" ". @@ -508,7 +499,10 @@ class workstartup extends plugin $SelectBoxLdapServer->SetHeight(130); /* Add new ldap server to the list */ - if(!$this->gotoLdap_inherit && isset($_POST['add_ldap_server']) && isset($_POST['ldap_server_to_add'])){ + if($this->acl_is_writeable("gotoLdapServer") && + !$this->gotoLdap_inherit && + isset($_POST['add_ldap_server']) && + isset($_POST['ldap_server_to_add'])){ if(isset($this->gotoLdapServerList[$_POST['ldap_server_to_add']])){ $to_add = $this->gotoLdapServerList[$_POST['ldap_server_to_add']]; if(!in_array($to_add,$this->gotoLdapServers)){ @@ -518,7 +512,7 @@ class workstartup extends plugin } /* Move ldap servers up and down */ - if(!$this->gotoLdap_inherit){ + if(!$this->gotoLdap_inherit && $this->acl_is_writeable("gotoLdapServer")){ foreach($_POST as $name => $value){ if(preg_match("/sort_ldap_up_/",$name)){ $id = preg_replace("/^sort_ldap_up_([0-9]*)_(x|y)$/","\\1",$name); @@ -550,17 +544,20 @@ class workstartup extends plugin } /* Add Entries */ - foreach($this->gotoLdapServers as $key => $server){ - /* Announce missing entries */ - if(!in_array($server,$this->gotoLdapServerList)){ - $server = $server." (missing)"; - } + if($this->acl_is_readable("gotoLdapServer")){ - /* Convert old style entry */ - if (!preg_match('%:ldaps?://%', $server)){ - $server= "ldap://".preg_replace('/^([^:]+):/', '\1/', $server); + foreach($this->gotoLdapServers as $key => $server){ - /* Beautify new style entries */ + /* Announce missing entries */ + if(!in_array($server,$this->gotoLdapServerList)){ + $server = $server." (missing)"; + } + + /* Convert old style entry */ + if (!preg_match('%:ldaps?://%', $server)){ + $server= "ldap://".preg_replace('/^([^:]+):/', '\1/', $server); + + /* Beautify new style entries */ } else { $server= preg_replace("/^[^:]+:/", "", $server); } @@ -572,6 +569,7 @@ class workstartup extends plugin " ". "", "attach" => "style='text-align:right;width:40px;border-right:0px;'"))); + } } if($this->gotoLdap_inherit){ -- 2.30.2