Permission issues

Hi,

I’m using the https://github.com/trntv/yii2-starter-kit

and I already made my frontend using the AdminLTE and it looks beautiful. I also created some new roles but the problem that I’m having is that I can’t login in the frontend with the new user that I created. I log in but it still says that the user is a guest.

Do I need to add any specific permission in the SignInController or the UserForm model to accept my new role?

Thanks for the help

There is some confusing language in your question. "User" can either be a guest or a registered user and a registered user can have zero or more roles.

Creating roles by themselves change nothing, they need to be associated to the user. If you are not using RBAC, each user can only have one role. In RBAC, there is a tree or roles and permissions that can be assigned to the user.

You then say that you login and the user is still a guest. This sounds like you are saying that the login has not succeeded (which is why the user is still a guest) and has nothing to do with whatever roles the user might or might not have.

There are various reasons why a user login might fail or otherwise it might appear to fail because the frontend does not correctly reflect the current user.

I am not familiar with the starter kit on github, so you are probably better off asking the author of that template what is going on or break your question down into separate points to make it clearer.

Thank you so much Lukos, the error was because I didn’t include the user as a child of my new role and I forgot to copy common/model/User.php to my frontend.

Thank you so much.