In magento 2, the product grid massaction are added via ui_component. My requirement is, to disable the product delete if the user has no permission. Not getting how to do that in magento 2.

In magento 1, used the grid rewrite to change the massaction. Let me know, if there is as way to make the massaction permission based in magento 2.

1 Answer 1


I didn't get any solution to the above problem. Instead, i have used preference to override the permission in the controller class for the delete product page.

Now, when user click on the delete massaction, the preference class will check if the user has permission, if no permission then change _isAllowed function to return false to show no permission page.

<preference for="Magento\Catalog\Controller\Adminhtml\Product\MassDelete" type="VendorName\ModuleName\Controller\Adminhtml\Catalog\Product\MassDelete" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.