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:
Eric
2018-11-13 11:11:15 +01:00
2 changed files with 7 additions and 1 deletions

View File

@@ -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');
}

View File

@@ -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);