Skip to content

Commit

Permalink
Fix field authorization (dcasia#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Süleyman ÖZEV committed Mar 26, 2022
1 parent baedc96 commit ba6495a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ConditionalContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public function __construct(array $fields)

parent::__construct('conditional_container_' . Str::random(10));

$this->fields = collect($fields);
$this->fields = collect($fields)->filter(function (Field $field) {
return $field->authorize(resolve(NovaRequest::class));
});
$this->expressions = collect();

$this->withMeta([ 'operation' => 'some' ]);
Expand Down

0 comments on commit ba6495a

Please sign in to comment.