new: [audit log] behaviour tied into the appropriate models
parent
72bd564120
commit
2e1ee2d064
|
@ -12,6 +12,7 @@ class AlignmentsTable extends AppTable
|
||||||
{
|
{
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->belongsTo('Individuals');
|
$this->belongsTo('Individuals');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->belongsTo('Organisations');
|
$this->belongsTo('Organisations');
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,7 +145,7 @@ class AuditLogsTable extends AppTable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($this->syslog) {
|
if ($this->syslog) {
|
||||||
$entry = $data['action'];
|
$entry = $data['request_action'];
|
||||||
$title = $entity->generateUserFriendlyTitle();
|
$title = $entity->generateUserFriendlyTitle();
|
||||||
if ($title) {
|
if ($title) {
|
||||||
$entry .= " -- $title";
|
$entry .= " -- $title";
|
||||||
|
|
|
@ -19,10 +19,11 @@ class AuthKeysTable extends AppTable
|
||||||
{
|
{
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->belongsTo(
|
$this->belongsTo(
|
||||||
'Users'
|
'Users'
|
||||||
);
|
);
|
||||||
$this->setDisplayField('authkey');
|
$this->setDisplayField('comment');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeMarshal(EventInterface $event, ArrayObject $data, ArrayObject $options)
|
public function beforeMarshal(EventInterface $event, ArrayObject $data, ArrayObject $options)
|
||||||
|
|
|
@ -19,6 +19,7 @@ class BroodsTable extends AppTable
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->BelongsTo(
|
$this->BelongsTo(
|
||||||
'Organisations'
|
'Organisations'
|
||||||
);
|
);
|
||||||
|
|
|
@ -14,6 +14,7 @@ class EncryptionKeysTable extends AppTable
|
||||||
{
|
{
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
$this->belongsTo(
|
$this->belongsTo(
|
||||||
'Individuals',
|
'Individuals',
|
||||||
|
|
|
@ -19,7 +19,7 @@ class InboxTable extends AppTable
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->belongsTo('Users');
|
$this->belongsTo('Users');
|
||||||
$this->setDisplayField('title');
|
$this->setDisplayField('title');
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ class IndividualsTable extends AppTable
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
$this->addBehavior('Tags.Tag');
|
$this->addBehavior('Tags.Tag');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->hasMany(
|
$this->hasMany(
|
||||||
'Alignments',
|
'Alignments',
|
||||||
[
|
[
|
||||||
|
|
|
@ -18,6 +18,8 @@ class InstanceTable extends AppTable
|
||||||
public function initialize(array $config): void
|
public function initialize(array $config): void
|
||||||
{
|
{
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
|
$this->setDisplayField('name');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validationDefault(Validator $validator): Validator
|
public function validationDefault(Validator $validator): Validator
|
||||||
|
|
|
@ -30,6 +30,7 @@ class LocalToolsTable extends AppTable
|
||||||
public function initialize(array $config): void
|
public function initialize(array $config): void
|
||||||
{
|
{
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ class MetaFieldsTable extends AppTable
|
||||||
{
|
{
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->setDisplayField('field');
|
$this->setDisplayField('field');
|
||||||
$this->belongsTo('MetaTemplates');
|
$this->belongsTo('MetaTemplates');
|
||||||
$this->belongsTo('MetaTemplateFields');
|
$this->belongsTo('MetaTemplateFields');
|
||||||
|
|
|
@ -20,6 +20,7 @@ class OrganisationsTable extends AppTable
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
$this->addBehavior('Tags.Tag');
|
$this->addBehavior('Tags.Tag');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->hasMany(
|
$this->hasMany(
|
||||||
'Alignments',
|
'Alignments',
|
||||||
[
|
[
|
||||||
|
|
|
@ -28,6 +28,7 @@ class OutboxProcessorsTable extends AppTable
|
||||||
if (empty($this->outboxProcessors)) {
|
if (empty($this->outboxProcessors)) {
|
||||||
$this->loadProcessors();
|
$this->loadProcessors();
|
||||||
}
|
}
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getProcessor($scope, $action=null)
|
public function getProcessor($scope, $action=null)
|
||||||
|
|
|
@ -19,8 +19,8 @@ class OutboxTable extends AppTable
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
|
|
||||||
$this->belongsTo('Users');
|
$this->belongsTo('Users');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->setDisplayField('title');
|
$this->setDisplayField('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ class RemoteToolConnectionsTable extends AppTable
|
||||||
'LocalTools'
|
'LocalTools'
|
||||||
);
|
);
|
||||||
$this->setDisplayField('id');
|
$this->setDisplayField('id');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validationDefault(Validator $validator): Validator
|
public function validationDefault(Validator $validator): Validator
|
||||||
|
|
|
@ -12,6 +12,7 @@ class RolesTable extends AppTable
|
||||||
{
|
{
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->hasMany(
|
$this->hasMany(
|
||||||
'Users',
|
'Users',
|
||||||
[
|
[
|
||||||
|
|
|
@ -26,6 +26,7 @@ class SettingsTable extends AppTable
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->setTable(false);
|
$this->setTable(false);
|
||||||
$this->SettingsProvider = new CerebrateSettingsProvider();
|
$this->SettingsProvider = new CerebrateSettingsProvider();
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSettings($full=false): array
|
public function getSettings($full=false): array
|
||||||
|
|
|
@ -15,6 +15,7 @@ class SharingGroupsTable extends AppTable
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->belongsTo(
|
$this->belongsTo(
|
||||||
'Users'
|
'Users'
|
||||||
);
|
);
|
||||||
|
|
|
@ -20,6 +20,7 @@ class UsersTable extends AppTable
|
||||||
parent::initialize($config);
|
parent::initialize($config);
|
||||||
$this->addBehavior('Timestamp');
|
$this->addBehavior('Timestamp');
|
||||||
$this->addBehavior('UUID');
|
$this->addBehavior('UUID');
|
||||||
|
$this->addBehavior('AuditLog');
|
||||||
$this->initAuthBehaviors();
|
$this->initAuthBehaviors();
|
||||||
$this->belongsTo(
|
$this->belongsTo(
|
||||||
'Individuals',
|
'Individuals',
|
||||||
|
|
Loading…
Reference in New Issue