Skip to content

Commit

Permalink
(#33) update condition to validate access events
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jul 10, 2023
1 parent 303f53c commit 0aebc4c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Services/EventSettingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ public function validateAccessEvent(Request $request, $payload): bool
$eventConfig = $eventConfig[$event] ?? false;

if (isset($payload->action) && isset($eventConfig[$payload->action])) {
return (bool)$eventConfig[$payload->action];
$eventConfig = $eventConfig[$payload->action];
}

error_log('\n Event config is not found \n');
return false;
if (!$eventConfig) {
error_log('\n Event config is not found \n');
}

return (bool)$eventConfig;
}
}

0 comments on commit 0aebc4c

Please sign in to comment.