-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
Creating a user with the role "SUPER_ADMIN" #1224
Comments
I think the best way would be to have a command like FOSUserBundle had where you could enter the user's email, then add/remove a role from it. But I'm not sure where that command would live. We could generate one from MakerBundle... just not sure about that. We'll see what others think :) |
I believe an equivalent for that command or something similar to it in the makerbundle would be quite useful |
I'm kind of mixed on this one. I can see it being useful to be able to generate a "super user" when running The only solid way I could see this working natively in MakerBundle is if we had some sort of "default security scheme" where we were opinionated on how an app's security architecture should work.. And that is getting outside the realm of what maker is meant to be used for. Another option potential option would be to have a one size fits all Open to ideas! |
I was thinking, that I use Reflection and get the setters for non nullable fields. This way we don't have a problem for inserting into the database. For security. I think sending a mail with a onetime link to validate the user with a lifetime of 5min would be efficient enough without the need of changing security. Especialy since SUPER_USER can be a default role for the first time and the develepoment team for whatever app handle their roles the way they want to. |
The problem with that approach is that If you mean to have an application deployed to a staging/production environment -> run a On another note that comes to mind, having "default" users built into an app with elevated privileges smells of a pretty big security concern from a "Symfony" standpoint. E.g. say we created a super user anytime someone ran The more I think about the best way to do this, the more I'm leaning towards leaving this functionality out of MakerBundle all together. Another alternative that may work for you - you can create your own maker command that extends |
Rather than mail why not add an argument |
And maybe and in production mode |
I don't think we're going to move forward with this in |
I want to create a superadmin account without the need to use fixtures or SQL request. While in developent I struggle with creating accounts with different roles. What's the best approach?
I want to make it as a contribution to people who struggled with user roles like me.
The text was updated successfully, but these errors were encountered: