- New implementation for the "join" display group, based on a complex OQL query and the display of several objects in the same row.

SVN:trunk[332]
This commit is contained in:
Denis Flaven
2010-04-14 09:42:11 +00:00
parent 4e2edaabfa
commit 0a28faa9df
2 changed files with 73 additions and 26 deletions

View File

@@ -459,6 +459,8 @@ abstract class cmdbAbstractObject extends CMDBObject
// Initialize and check the parameters
$bDisplayMenu = isset($aExtraParams['menu']) ? $aExtraParams['menu'] == true : true;
// Check if there is a list of aliases to limit the display to...
$aDisplayAliases = isset($aExtraParams['display_aliases']) ? explode(',', $aExtraParams['display_aliases']) : array();
$sHtml = '';
$oAppContext = new ApplicationContext();
@@ -466,7 +468,8 @@ abstract class cmdbAbstractObject extends CMDBObject
$aAuthorizedClasses = array();
foreach($aClasses as $sAlias => $sClassName)
{
if (UserRights::IsActionAllowed($sClassName, UR_ACTION_READ, $oSet) == UR_ALLOWED_YES)
if ((UserRights::IsActionAllowed($sClassName, UR_ACTION_READ, $oSet) == UR_ALLOWED_YES) &&
( (count($aDisplayAliases) == 0) || (in_array($sAlias, $aDisplayAliases))) )
{
$aAuthorizedClasses[$sAlias] = $sClassName;
}