-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable creation of frontend user on backend admin #75
base: master
Are you sure you want to change the base?
Conversation
This feature is big! Changese resolved problems in use the webvimark/user-management in advanced app by Yii2. See in http://www.yiiframework.com/doc-2.0/yii-web-user.html about status users dont show 'status 10' however in the default advanced app, in the front, a feature 'sing in' create 1 user with status setted in '10'. |
Hey. I'm quite confused with this status. How this status may help? |
If fast you install by default an Advanced application to yii2 the front and generated with the login and Registration , q being the login only allows 10 users to log status and when you register , it records with status 10 . It seems to me to be something already defined in the core yii2 . @JanFrS it is? |
I wanted to be able to create a frontend user on backend admin, so I've figured out that, when a user is registered on frontend, it is given to that user a status value of 10. This seems to be the default behavior for the user module on Yii's advanced application. What I did was enabling the admin user form to assign a status of 10 and with that, he is able to login on frontend. I'm not really sure if that's the nicest way of doing it. As you said, this are two different modules. I'm curious if that feature of being able to create frontend users on backend admin is worth it, even if it requires a different implementation point of view... What do you think about that @webvimark ? |
Hi gus!!! @webvimark think about it? |
@JanFrS please explain how you plan deny frontend users to access the backend part in case when frontend end backend has one ore more identical routes(situation fantastic but possible) I mean when front and back are separated apps? |
usage part didn't understand for me, some one please help me |
@padlyuck Can you give an example where that would happen? In my experience, that didn't happen. What happens though is that, after login, the user is brought back to the last page he visited. And that access is not ACL protected. So that's another bug I think... But on real world that would not happen, cause the user would never be on a backend page to begin with... Again I restate, not sure if that's the correct way to implement it, but it has done the job for me... And I thought It could solve this problem for others. So @webvimark, you should check out how your module behaves on Advanced template. It works allright, but that feature would be killer. |
@JanFrS I thought about it one more time and came to a conclusion that you were right. Your proposition is very helpful. But may be it would be better to add some field to Role(auth_item table) instead of breaking backward compability? Or I misunderstood phrase "that feature would be killer"? |
Yeah, I meant it would be an awesome feature as in Killer feature, sorry |
@JanFrS In russian "killer feature" sometimes means that feature will really kill backward compability)) |
@padlyuck I don't think I did... backend admin does this already... i think |
@JanFrS please tell how you check this status? As for me, i set "beforeLogin" event listener in app config and add "frontendOnly" group to rbac. It's not pretend to a beautiful solution, but it works for my purposes. so it's interesting to me how you solved this problem. |
A frontend user has a status of 10. On backend, I can create a user and assign that status, so he will be able to login on frontend as well. How about that?