From: hickert Date: Tue, 12 Jan 2010 09:57:48 +0000 (+0000) Subject: Updated systems to display pwd change icon X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=31ec8dd5982cad84e93576e80fb65d8a8d3b9ab4;p=gosa.git Updated systems to display pwd change icon git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15150 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc b/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc index 07925c85a..4489bdeba 100644 --- a/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc +++ b/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc @@ -4,8 +4,9 @@ class filterSYSTEMS { static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "") { - $entries = filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage); + $ui = get_userinfo(); + $entries = filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage); foreach($entries as $key => $entry){ if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'),'/')."/i", $entry['dn'])){ @@ -28,23 +29,42 @@ class filterSYSTEMS { }elseif(in_array('sambaSamAccount', $entry['objectClass']) && preg_match("/\$$/", $entry['cn'][0])){ $entries[$key]['objectClass'][] = 'FAKE_OC_winstation'; - // Detect Workstation templates + // Detect Workstation & templates }elseif(in_array('gotoWorkstation', $entry['objectClass'])){ if(!isset($entry['macAddress'][0]) || $entry['macAddress'][0] == "-"){ $entries[$key]['objectClass'][] = 'FAKE_OC_WorkstationTemplate'; } + $pwd_acl = $ui->get_permissions($entry['dn'],'workstation/workgeneric','userPassword'); + if(preg_match("/w/",$pwd_acl)){ + $entries[$key]['objectClass'][] = 'FAKE_OC_PWD_changeAble'; + } - // Detect Terminal templates + // Detect Terminal & templates }elseif(in_array('gotoTerminal', $entry['objectClass'])){ if(!isset($entry['macAddress'][0]) || $entry['macAddress'][0] == "-"){ $entries[$key]['objectClass'][] = 'FAKE_OC_TerminalTemplate'; } + $pwd_acl = $ui->get_permissions($entry['dn'],'terminal/termgeneric','userPassword'); + if(preg_match("/w/",$pwd_acl)){ + $entries[$key]['objectClass'][] = 'FAKE_OC_PWD_changeAble'; + } - // Detect Server templates + // Detect Server & templates }elseif(in_array('goServer', $entry['objectClass'])){ if(!isset($entry['macAddress'][0]) || $entry['macAddress'][0] == "-"){ $entries[$key]['objectClass'][] = 'FAKE_OC_ServerTemplate'; } + $pwd_acl = $ui->get_permissions($entry['dn'],'server/servgeneric','userPassword'); + if(preg_match("/w/",$pwd_acl)){ + $entries[$key]['objectClass'][] = 'FAKE_OC_PWD_changeAble'; + } + + // Detect ieee802Device + }elseif(in_array('ieee802Device', $entry['objectClass'])){ + $pwd_acl = $ui->get_permissions($entry['dn'],'component/componentGeneric','userPassword'); + if(preg_match("/w/",$pwd_acl)){ + $entries[$key]['objectClass'][] = 'FAKE_OC_PWD_changeAble'; + } } // Detect object states diff --git a/gosa-plugins/systems/admin/systems/system-list.xml b/gosa-plugins/systems/admin/systems/system-list.xml index bc34465ad..d38be6260 100644 --- a/gosa-plugins/systems/admin/systems/system-list.xml +++ b/gosa-plugins/systems/admin/systems/system-list.xml @@ -425,6 +425,15 @@ + + setPassword + entry + FAKE_OC_PWD_changeAble + images/lists/key.png + + + + createISO entry