jmaumene / user-bundle
There is no license information available for the latest version (0.1.0) of this package.
Basic User Bundle with administration and account
0.1.0
2016-08-15 10:43 UTC
Requires
- php: ^5.5.0 || ^7.0
- twig/extensions: ~1.0
This package is not auto-updated.
Last update: 2025-01-09 10:52:19 UTC
README
User-Bundle add administration and account with user on symfony 3 framework
Install
Edit /app/config/AppKernel.php and add :
new Jmaumene\Bundle\UserBundle\JmaumeneUserBundle(),
Edit /app/config/routing.yml and add :
jmaumene_user:
resource: "@JmaumeneUserBundle/Resources/config/routing.yml"
prefix: /
Edit /app/config/config.yml :
imports:
- { resource: '@JmaumeneUserBundle/Resources/config/security.yml' }
If you want change default parameters, you can Edit /app/config/security.yml and add :
security:
encoders:
Jmaumene\Bundle\UserBundle\Entity\UserBase:
algorithm: bcrypt
role_hierarchy:
ROLE_PUBLISHER : ROLE_USER
ROLE_ADMIN: [ROLE_PUBLISHER, ROLE_USER]
ROLE_SUPER_ADMIN: [ROLE_PUBLISHER, ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
jmaumene_user:
entity:
class: JmaumeneUserBundle:UserBase
property: username
in_memory:
memory: ~
firewalls:
# disables authentication for js,css, images, etc...
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
anonymous: ~
provider: jmaumene_user
form_login:
login_path: jmaumene_userbundle_login
check_path: jmaumene_userbundle_login_check
logout:
path: jmaumene_userbundle_logout
target: homepage
# Remember me
#remember_me:
# secret: '%secret%'
# lifetime: 604800 # 1 week in seconds
# path: /
access_control:
- { path: ^/account, roles: ROLE_USER }
- { path: ^/account/admin, roles: ROLE_ADMIN }
Create table
$ bin/console doctrine:schema:update
Create User
$ bin/console jmuserbundle:create-user myUser
Template
Default theme use Bootstrap with Glyphicon
About
Julien Maumené http://www.maumene.fr