mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
N°4036 - User edition controls : a user cannot remove contact
This commit is contained in:
@@ -408,8 +408,9 @@ abstract class User extends cmdbAbstractObject
|
||||
|
||||
// A contact is mandatory (an administrator can bypass it but not for himself)
|
||||
if ((!UserRights::IsAdministrator() || $this->IsCurrentUser())
|
||||
&& !$this->IsNew()
|
||||
&& isset($aChanges['contactid'])
|
||||
&& ((empty($this->GetOriginal('contactid')) && !($this->IsNew())) || empty($this->Get('contactid')))) {
|
||||
&& empty($this->Get('contactid'))) {
|
||||
$this->m_aCheckIssues[] = Dict::S('Class:User/Error:PersonIsMandatory');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user