zizohassan / laraflat

Advanced laravel system to build admin panel
http://laraflat.com
MIT License
150 stars 76 forks source link

Remove unneeded action buttons #46

Closed OmarAlesharie closed 6 years ago

OmarAlesharie commented 6 years ago

I added a user that can't delete product, it works by throwing the user out when he tries to delete something from the products, but I don't want the user to have a delete button from the first place, should I do that by code? or I missed something in permissions, rules, or groups?

nodeletebutton

deva7mad commented 6 years ago

you didn't make any thing wrong .. it's normal to throw the user out that happend because permission

you can make if statement on datatable file that belong to product .. check if the user have access to delete show the delete button else don't show it

zizohassan commented 6 years ago

laraflat add permissions automatic to the user , admin groups when you add new model you can remover the button from the dom