-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
auditExclude merge versus replace #969
base: master
Are you sure you want to change the base?
Conversation
…lude Allows for merging the model's audit exclude with the config default exclude list, instead of replacing it.
When getting the auditExclude values, check for global config audit.exclude_merge property and merge if enabled, instead of replace. Otherwise, check locally at the model level.
…ude-merge AuditExclude merge feature
Simplify the merge condition check
@@ -144,8 +144,7 @@ protected function resolveAuditExclusions() | |||
public function getAuditExclude(): array | |||
{ | |||
if ( | |||
Config::get('audit.exclude_merge', false) || | |||
($this->auditExcludeMerge ?? false) | |||
$this->auditExcludeMerge ?? Config::get('audit.exclude_merge', false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that you decided not to follow the instructions
the false
is not necessary, the default is null
and the null on a if
is already false
if ($this->auditExcludeMerge ?? Config::get('audit.exclude_merge')) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, now I understand. Code updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code updated.
the 'false' is still there 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as mentioned by @parallels999, the , false)
is not necessary
it would also be good to see a few tests for the different combinations of the auditExcludeMerge property and the config value
Allows for merging the local auditExclude values into the global exclude list instead of replacing it.