mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Added support for an abstract Organization (or Person) class during setup !
SVN:trunk[1461]
This commit is contained in:
@@ -538,8 +538,8 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
||||
$oChange->Set("userinfo", "Initialization");
|
||||
$iChangeId = $oChange->DBInsert();
|
||||
|
||||
// Support drastic data model changes: no organization class !
|
||||
if (MetaModel::IsValidClass('Organization'))
|
||||
// Support drastic data model changes: no organization class (or not writable)!
|
||||
if (MetaModel::IsValidClass('Organization') && !MetaModel::IsAbstract('Organization'))
|
||||
{
|
||||
$oOrg = new Organization();
|
||||
$oOrg->Set('name', 'My Company/Department');
|
||||
@@ -551,8 +551,8 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
||||
$iOrgId = 0;
|
||||
}
|
||||
|
||||
// Support drastic data model changes: no Person class !
|
||||
if (MetaModel::IsValidClass('Person'))
|
||||
// Support drastic data model changes: no Person class (or not writable)!
|
||||
if (MetaModel::IsValidClass('Person') && !MetaModel::IsAbstract('Person'))
|
||||
{
|
||||
$oContact = new Person();
|
||||
$oContact->Set('name', 'My last name');
|
||||
|
||||
Reference in New Issue
Block a user