diff --git a/datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml b/datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml
index 04c8b00e65..ba8541e2e8 100755
--- a/datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml
+++ b/datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml
@@ -526,7 +526,84 @@
0
-
+
+
+ false
+ public
+ Overload-DBObject
+ Get('demo_mode'))
+ {
+ if ($this->HasUserAccount())
+ {
+ // Do not let users change user accounts in demo mode
+ $oDeletionPlan->AddToDelete($this, null);
+ $oDeletionPlan->SetDeletionIssues($this, array('deletion not allowed in demo mode.'), true);
+ $oDeletionPlan->ComputeResults();
+ return false;
+ }
+ }
+ return parent::CheckToDelete($oDeletionPlan);
+ }
+]]>
+
+
+ false
+ public
+ Overload-DBObject
+ Get('demo_mode'))
+ {
+ if ($this->HasUserAccount())
+ {
+ // Do not let users change user accounts in demo mode
+ return;
+ }
+ }
+ parent::DBDeleteSingleObject();
+ }
+]]>
+
+
+ false
+ public
+ Overload-DBObject
+ IsNew()) )
+ {
+ if (MetaModel::GetConfig()->Get('demo_mode'))
+ {
+ if ($this->HasUserAccount())
+ {
+ // Do not let users change user accounts in demo mode
+ return OPT_ATT_READONLY;
+ }
+ }
+ }
+ return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
+ }
+]]>
+
+
+ false
+ public
+ Helper
+ $this->GetKey())));
+ $bHasUserAccount = ($oUserSet->Count() > 0);
+ }
+ return $bHasUserAccount;
+ }
+]]>
+
+