fix: [user init] generation fixed
parent
b009191aa6
commit
c2cefb4311
|
@ -10,10 +10,5 @@ class Organisation extends AppModel
|
|||
protected $_accessible = [
|
||||
'*' => true,
|
||||
'id' => false,
|
||||
'uuid' => false,
|
||||
];
|
||||
|
||||
protected $_accessibleOnNew = [
|
||||
'uuid' => true,
|
||||
];
|
||||
}
|
||||
|
|
|
@ -11,17 +11,13 @@ class OrganisationsTable extends AppTable
|
|||
{
|
||||
public $metaFields = 'organisation';
|
||||
|
||||
protected $_accessible = [
|
||||
'id' => false
|
||||
];
|
||||
|
||||
public function initialize(array $config): void
|
||||
{
|
||||
parent::initialize($config);
|
||||
$this->addBehavior('UUID');
|
||||
$this->addBehavior('Timestamp');
|
||||
$this->addBehavior('Tags.Tag');
|
||||
$this->addBehavior('AuditLog');
|
||||
$this->addBehavior('UUID');
|
||||
$this->hasMany(
|
||||
'Alignments',
|
||||
[
|
||||
|
|
|
@ -122,7 +122,8 @@ class UsersTable extends AppTable
|
|||
$this->Roles->save($role);
|
||||
$this->Organisations = TableRegistry::get('Organisations');
|
||||
$organisation = $this->Organisations->newEntity([
|
||||
'name' => 'default_organisation'
|
||||
'name' => 'default_organisation',
|
||||
'uuid' => Text::uuid()
|
||||
]);
|
||||
$this->Organisations->save($organisation);
|
||||
$this->Individuals = TableRegistry::get('Individuals');
|
||||
|
|
Loading…
Reference in New Issue