mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°1706 - Fix problem with user_manager profile
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');
|
||||
}
|
||||
|
||||
@@ -480,6 +480,7 @@ class SearchForm
|
||||
*
|
||||
* @return array
|
||||
* @throws \MissingQueryArgument
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function GetCriterion($oSearch, $aFields, $aArgs = array(), $bIsRemovable = true)
|
||||
{
|
||||
@@ -554,6 +555,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