jeudi 22 juin 2017

How can I implement role based access control for specified section in Laravel 5.2?

i am trying to develop a shop automation web application for retail chains. I want to implement role based access control(RBAC) in this app.

There are mainly four type of users.

  1. Admin
  2. Shop Manager
  3. Accountant
  4. Cachier

I tried to implement RBAC by using Entrust package. Admin can do all activities and accountant can view all accounts. I have doubt related to shop manager or Cachier role. There are many shops under one product. But shop manager or Cachier should bill for sold items in assigned only.

How can I check is activities of shop manager or Cachier in his assigned shop only using Entrust plugin?

I can do with middleware by checking shop cachier_id or shop_manager_id. This will need two more middlewares. But I need to implement by reducing number of middlewares.

Can any one provide solution? Thanks in advance.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2rUf3SA
via IFTTT

Aucun commentaire:

Enregistrer un commentaire