mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 22:48:45 +02:00
#415 Could not limit user on some organization (symptom: wrong queries... org_id does not exist...)
SVN:trunk[1319]
This commit is contained in:
@@ -751,17 +751,24 @@ exit;
|
||||
|
||||
// Determine how to position the objects of this class
|
||||
//
|
||||
$aCallSpec = array($sClass, 'MapContextParam');
|
||||
if ($sClass == 'Organization')
|
||||
{
|
||||
$sAttCode = 'id';
|
||||
}
|
||||
elseif (is_callable("$sClass::MapContextParam"))
|
||||
elseif (is_callable($aCallSpec))
|
||||
{
|
||||
$sAttCode = eval("return $sClass::MapContextParam('org_id');"); // Returns null when there is no mapping for this parameter
|
||||
$sAttCode = call_user_func($aCallSpec, 'org_id'); // Returns null when there is no mapping for this parameter
|
||||
|
||||
if ($sAttCode == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!MetaModel::IsValidAttCode($sClass, $sAttCode))
|
||||
{
|
||||
// Skip silently. The data model checker will tell you something about this...
|
||||
return true;
|
||||
}
|
||||
}
|
||||
elseif(MetaModel::IsValidAttCode($sClass, 'org_id'))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user