mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Only return access result allowed or access result neutral.
This commit is contained in:
parent
a2cb3b26ab
commit
76d6370fb3
|
@ -59,7 +59,7 @@ class FarmAssetLogViewsAccessCheck implements AccessInterface {
|
|||
|
||||
// Determine access based on the log count.
|
||||
$log_count = (int) $result[0]['id_count'] ?? 0;
|
||||
$access = empty($log_count) ? AccessResult::forbidden() : AccessResult::allowed();
|
||||
$access = AccessResult::allowedIf($log_count > 0);
|
||||
|
||||
// Invalidate the access result when logs of this bundle are changed.
|
||||
$access->addCacheTags(["log_list:$log_type"]);
|
||||
|
|
Loading…
Reference in a new issue