Page 1 of 1
How to create admin user after first install bundle ?
Posted: 06 Jul 2017, 09:57
by ksicinski
How to create admin user after first install bundle ?
or
How to create user and give him privilege to be admin?
Re: How to create admin user after first install bundle ?
Posted: 06 Jul 2017, 15:52
by aimeos
That highly depends on your used authentication configuration. Please have a look into the Symfony documentation for a deeper insight into authentication.
An example for setting up the FOS user bundle is described here:
https://aimeos.org/docs/Symfony/Configu ... ndle_login
There you can set up an admin account executing this command:
Code: Select all
bin/console aimeos:account --admin <your email>
Re: How to create admin user after first install bundle ?
Posted: 10 Jul 2017, 20:44
by ksicinski
I add this configuration and stop at lat command line ;/
./bin/console fos:user:promote <email address> ROLE_ADMIN
I got this error:
[Doctrine\ORM\Mapping\MappingException]
Duplicate definition of column 'salt' on entity 'Aimeos\ShopBundle\Entity\FosUser' in a field or discriminator column mapping.
any tips?
Re: How to create admin user after first install bundle ?
Posted: 11 Jul 2017, 12:39
by aimeos
ksicinski wrote:
./bin/console fos:user:promote <email address> ROLE_ADMIN
I got this error:
[Doctrine\ORM\Mapping\MappingException]
Duplicate definition of column 'salt' on entity 'Aimeos\ShopBundle\Entity\FosUser' in a field or discriminator column mapping.
We've release the new 2017.07 version today. Can you please update to that version and set up authentication like described in the documentation?
https://github.com/aimeos/aimeos-symfony#installation
Then, things should work as expected when using fos:user:promote
Re: How to create admin user after first install bundle ?
Posted: 11 Jul 2017, 19:07
by ksicinski
Your update help.
I have only one remark this is bad lousy solution:
I can forgot add this
--no-dev parameters and add some new bundle and make update at production server this maibe crashed prod shop ;/
I thin better option will be create symfony console command to run all method hidden in this
--no-dev parameters and add to manual information to run this command if user want install dev items.
Re: How to create admin user after first install bundle ?
Posted: 12 Jul 2017, 09:57
by aimeos
To be more precise, it should be
Code: Select all
SYMFONY_ENV=prod composer update --no-dev
like stated in the installation documentation at GitHub