Make delete handler respect canDelete (#142)

This commit is contained in:
Rob Ingram 2017-06-29 18:33:22 +12:00 committed by Thierry François
parent 3aad957a69
commit c7a275a7a6

View File

@ -34,9 +34,11 @@ class GridFieldBulkActionDeleteHandler extends GridFieldBulkActionHandler
$ids = array();
foreach ($this->getRecords() as $record) {
if ($record->canDelete()) {
array_push($ids, $record->ID);
$record->delete();
}
}
$response = new SS_HTTPResponse(Convert::raw2json(array(
'done' => true,