type attribute for principal-property-search report limiting search on a certain type/tree

This commit is contained in:
Ralf Becker 2011-10-20 20:00:13 +00:00
parent d898e6c627
commit e0690d2342

View File

@ -309,6 +309,25 @@ class groupdav_principals extends groupdav_handler
$path = '/principals/users/'.$GLOBALS['egw_info']['user']['account_lid'].'/';
}
}
// check type attribute to limit search on a certain tree
if (isset($options['root']['attrs']['type']))
{
switch($options['root']['attrs']['type'])
{
case 'INDIVIDUAL':
$path = '/principals/users/';
break;
case 'GROUP':
$path = '/principals/groups/';
break;
case 'ROOM':
$path = '/principals/locations/';
break;
case 'RESOURCE':
$path = '/principals/resources/';
break;
}
}
// run "regular" propfind
$options['other'] = array();
$options['root']['name'] = 'propfind';