Skip to content

Commit

Permalink
Check customer before deleting reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Jun 11, 2024
1 parent 53eebdc commit f7c6a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Frontend/Review/Standard.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public function create( array $vals = [] ) : \Aimeos\MShop\Review\Item\Iface
public function delete( $ids ) : Iface
{
$ids = (array) $ids;
$filter = $this->manager->filter()->add( ['review.id' => $ids] );
$filter = $this->manager->filter()->add( ['review.id' => $ids, 'review.customerid' => $this->context()->user()] );
$this->manager->delete( $this->manager->search( $filter->slice( 0, count( $ids ) ) )->toArray() );

return $this;
Expand Down

0 comments on commit f7c6a9c

Please sign in to comment.