Antop
Antop

Reputation: 123

BackPack: How to have Users that can't access to admin?

I want to use BackPack for Laravel to manage the contents/users of my WebApp.

My WebApp have users, and these users can access to another private area (outside BackPack)

I want that the users don't have access to the BackPack Admin Panel when the're logged in. Also, even they can't never access to /admin

Is that possible?

Upvotes: 0

Views: 754

Answers (1)

tabacitu
tabacitu

Reputation: 6193

Yes, that's the default in Backpack v5. Make sure you use separate login forms and middleware for your users and admin:

  • the backpack middleware for the admins
  • Laravel's auth middleware for your users

Alternatively, you can use the same login forms and middleware, and use the App\Http\CheckIfAdmin.php middleware to define what makes an admin and admin.

Upvotes: 1

Related Questions