mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 01:58:47 +02:00
N°7131 - Allow Data Synchro to change the Org of a Person regardless of its Users
This commit is contained in:
@@ -746,7 +746,7 @@
|
||||
$aProfiles = $oSet->GetColumnAsArray('profile');
|
||||
|
||||
// User is not allowed on the new Organization and has 'Portal user' Profile and is enabled
|
||||
if ((count($aOrgs) > 0) && !in_array($this->Get('org_id'), $aOrgs) && in_array('Portal user',$aProfiles) && ($oUser->Get('status') === 'enabled'))
|
||||
if ((count($aOrgs) > 0) && !in_array($this->Get('org_id'), $aOrgs) && in_array('Portal user',$aProfiles) && ($oUser->Get('status') === 'enabled') && !ContextTag::Check(ContextTag::TAG_SYNCHRO))
|
||||
{ // Let's block the Person modification,
|
||||
// replace by $this->AddCheckWarning(...) if you don't want to block the modification
|
||||
$this->AddCheckIssue(Dict::Format('Class:Person/Error:ChangingOrgDenied', $this->Get('org_id_friendlyname')));
|
||||
|
||||
Reference in New Issue
Block a user