From: hickert Date: Mon, 3 Nov 2008 15:00:41 +0000 (+0000) Subject: Added ACLs to ldap server selection in terminal and workstation startup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=07d2ddd74ce9054f90c62494546dc6245d5be5ca;p=gosa.git Added ACLs to ldap server selection in terminal and workstation startup git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12876 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc index 7f9c67839..df75154e0 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc @@ -71,9 +71,21 @@ class termstartup extends plugin $this->orig_dn= $this->dn; - foreach($this->config->data['SERVERS']['LDAP'] as $server) { - $this->gotoLdapServerList[]= $server; + /* Creating a list of valid Mirrors + * none will not be saved to ldap. + */ + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + $ui = get_userinfo(); + foreach($this->config->data['SERVERS']['LDAP'] as $dn => $data){ + if($ui->get_category_permissions($data['dn'],"server",TRUE)){ + for($i = 0; $i < $data['goLdapBase']['count']; $i ++){ + $name = $data["cn"][0].":".$data["goLdapBase"][$i]; + $this->gotoLdapServerList[]= $name; + } + } } + if(isset($this->attrs['gotoLdapServer'])){ unset($this->attrs['gotoLdapServer']['count']); sort($this->attrs['gotoLdapServer']); diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index da4a7d674..ceaf0cf23 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -90,8 +90,14 @@ class workstartup extends plugin */ $ldap = $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - foreach($this->config->data['SERVERS']['LDAP'] as $server) { - $this->gotoLdapServerList[]= $server; + $ui = get_userinfo(); + foreach($this->config->data['SERVERS']['LDAP'] as $dn => $data){ + if($ui->get_category_permissions($data['dn'],"server",TRUE)){ + for($i = 0; $i < $data['goLdapBase']['count']; $i ++){ + $name = $data["cn"][0].":".$data["goLdapBase"][$i]; + $this->gotoLdapServerList[]= $name; + } + } } /* Get list of assigned ldap servers