How to remove delete product functionality for a specific user role? ( The user should only have access to edit the products. ) In default magento community edition i cannot achieve this. Which code should i modify to make this work?
Magento 1.9 – How to Remove Delete Product Functionality for Specific User Role
magento-1.9permissionsuser-roles
Best Answer
Create a custom module. Make the necessary name changes and add this to the etc/config.xml. Rewriting adminthtml to remove the delete and mass delete. Events are to lock a particular attribute if you don't want to give the user role to edit that attribute.
Block/Adminhtml/Product/Edit.php (This is to remove the delete button in the product edit page)
Block/Adminhtml/Product/Grid.php (This is to remove the mass delete from actions in all products page)
Model/Observer.php (To lock attributes in product edit page if required)