Answer the question
In order to leave comments, you need to log in
How to add authorization only for backend in yii2 advanced?
Hello!
I have a project where the frontend is for a normal non-logged in user, and the backend is for an admin who needs to log in.
So here's how to make sure that when you go to the backend, nothing can be done until you log in? And is it necessary to use rbac in this case?
Answer the question
In order to leave comments, you need to log in
It is not necessary to use rbac, but I would recommend that there would be fewer tears later when needed. This is the admin panel, the probability that roles will appear in it tomorrow is very high, even if we do not plan today.
Basically it's all there out of the box. I advise you to read the official guide before doing anything at all: https://www.yiiframework.com/doc/guide/2.0/en
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question