mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge remote-tracking branch 'origin/support/2.5' into release/2.6
# Conflicts: # sources/application/search/searchform.class.inc.php
This commit is contained in:
@@ -308,7 +308,7 @@ abstract class User extends cmdbAbstractObject
|
||||
if (count($aOrgs) > 0)
|
||||
{
|
||||
// Check that the modified User belongs to one of our organization
|
||||
if (!in_array($this->GetOriginal('org_id'), $aOrgs) || !in_array($this->Get('org_id'), $aOrgs))
|
||||
if (!in_array($this->GetOriginal('org_id'), $aOrgs) && !in_array($this->Get('org_id'), $aOrgs))
|
||||
{
|
||||
$this->m_aCheckIssues[] = Dict::Format('Class:User/Error:UserOrganizationNotAllowed');
|
||||
}
|
||||
|
||||
@@ -562,6 +562,12 @@ class SearchForm
|
||||
|
||||
foreach($aContextParams as $sParamCode => $sParamValue)
|
||||
{
|
||||
// Check that the code exists in the concerned class
|
||||
if (!MetaModel::IsValidAttCode($oSearch->GetClass(), $sParamCode))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add Context criteria in read only mode
|
||||
$sAlias = $oSearch->GetClassAlias();
|
||||
$oFieldExpression = new FieldExpression($sParamCode, $sAlias);
|
||||
|
||||
Reference in New Issue
Block a user