summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e4a387)
raw | patch | inline | side by side (parent: 9e4a387)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Jan 2010 09:57:48 +0000 (09:57 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Jan 2010 09:57:48 +0000 (09:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15150 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/system-list.xml | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc b/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc
index 07925c85a1c137539cb6ed1e742d724d52fbe0f4..4489bdeba96e6b3b659c95ef5b4b39ad4b9fb059 100644 (file)
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'])){
}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 bc34465ad920f85dc436a169d8d3a5a3c35f40b8..d38be6260cc0ece6f413930013a05298ee71a68a 100644 (file)
<actiontriggers snapshot="true" copypaste="true">
+ <action>
+ <name>setPassword</name>
+ <type>entry</type>
+ <objectclass>FAKE_OC_PWD_changeAble</objectclass>
+ <image>images/lists/key.png</image>
+ <label>Change password</label>
+ </action>
+
+
<action>
<name>createISO</name>
<type>entry</type>