new: [settings:inbox.data_change_notify_for_all] Added setting to be more verbose for data changes
parent
eefe6b22cc
commit
ecc421b326
|
@ -73,7 +73,10 @@ class NotifyAdminsBehavior extends Behavior
|
||||||
public function isNotificationAllowed(EventInterface $event, EntityInterface $entity, ArrayObject $options): bool
|
public function isNotificationAllowed(EventInterface $event, EntityInterface $entity, ArrayObject $options): bool
|
||||||
{
|
{
|
||||||
$loggedUser = Configure::read('loggedUser');
|
$loggedUser = Configure::read('loggedUser');
|
||||||
if (empty($loggedUser) || !empty($loggedUser['role']['perm_admin']) || !empty($loggedUser['role']['perm_sync'])) {
|
if (
|
||||||
|
empty(Configure::read('inbox.data_change_notify_for_all', false)) &&
|
||||||
|
(empty($loggedUser) || !empty($loggedUser['role']['perm_admin']) || !empty($loggedUser['role']['perm_sync']))
|
||||||
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -351,7 +351,20 @@ class CerebrateSettingsProvider extends BaseSettingsProvider
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
],
|
||||||
|
'Inbox' => [
|
||||||
|
'Data change notification' => [
|
||||||
|
'Data change notification' => [
|
||||||
|
'inbox.data_change_notify_for_all' => [
|
||||||
|
'name' => __('Notify data modification for all Users'),
|
||||||
|
'type' => 'boolean',
|
||||||
|
'description' => __('Turning this option ON will alert administrators whenever data is modified, irrespective of the user\'s role responsible for the modification.'),
|
||||||
|
'default' => false,
|
||||||
|
'severity' => 'warning',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
/*
|
/*
|
||||||
'Features' => [
|
'Features' => [
|
||||||
'Demo Settings' => [
|
'Demo Settings' => [
|
||||||
|
|
Loading…
Reference in New Issue