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 5833db6 commit 700da5e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,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 700da5e

Please sign in to comment.