* improved dev fixtures with more diversity, more data, better testcases, user avatars #42 * added customer stats to dashboard, fixed column length for 3 widgets #42 * fixed empty alias - display empty message for new user #42 * unified-ui for "new" toolbar icon #42 * use kimai2_ as database prefix #42 * added customer stats to dashboard, fixed column length for 3 widgets #42 * fix long project/customer names in "currently active" navbar flyout" #42 * added services config for dev environment #42 * added command to run unit tests #42 * added command to run integration tests #42 * added command to run code sniffer #42 * added phpcs and phpunit to composer #42 * created tests directory #42 * fixed code sniffer warnings #42 * added function to switch result type from Pagerfanta to QueryBuilder #42 * dramatically reduced database calls by using custom joined query #42 * added command to install kimai dependencies #42 * added dev:reset command #42
57 lines
2.4 KiB
YAML
57 lines
2.4 KiB
YAML
security:
|
|
encoders:
|
|
# Our user class and the algorithm we'll use to encode passwords
|
|
# http://symfony.com/doc/current/book/security.html#encoding-the-user-s-password
|
|
AppBundle\Entity\User: bcrypt
|
|
|
|
providers:
|
|
# in this example, users are stored via Doctrine in the database
|
|
# demo users can be found at src/AppBundle/DataFixtures/ORM/LoadFixtures.php
|
|
database_users:
|
|
entity: { class: AppBundle:User, property: username }
|
|
|
|
# http://symfony.com/doc/current/book/security.html#firewalls-authentication
|
|
firewalls:
|
|
secured_area:
|
|
# does what it says
|
|
logout_on_user_change: true
|
|
|
|
# this firewall applies to all URLs
|
|
pattern: ^/
|
|
|
|
# but the firewall does not require login on every page
|
|
# denying access is done in access_control or in your controllers
|
|
anonymous: ~
|
|
|
|
# This allows the user to login by submitting a username and password
|
|
# Reference: http://symfony.com/doc/current/cookbook/security/form_login_setup.html
|
|
form_login:
|
|
# The route name that the login form submits to
|
|
check_path: security_login
|
|
# The name of the route where the login form lives
|
|
# When the user tries to access a protected page, they are redirected here
|
|
login_path: security_login
|
|
# Secure the login form against CSRF
|
|
# Reference: http://symfony.com/doc/current/cookbook/security/csrf_in_login_form.html
|
|
csrf_token_generator: security.csrf.token_manager
|
|
|
|
logout:
|
|
# The route name the user can go to in order to logout
|
|
path: security_logout
|
|
# The name of the route to redirect to after logging out
|
|
target: homepage
|
|
|
|
role_hierarchy:
|
|
ROLE_USER: ROLE_CUSTOMER
|
|
ROLE_TEAMLEAD: ROLE_USER
|
|
ROLE_ADMIN: ROLE_TEAMLEAD
|
|
ROLE_SUPER_ADMIN: ROLE_ADMIN
|
|
|
|
access_control:
|
|
# this is a catch-all for the admin area
|
|
# additional security lives in the controllers
|
|
- { path: '^/(%app_locales%)$', role: IS_AUTHENTICATED_FULLY }
|
|
- { path: '^/(%app_locales%)/login', role: IS_AUTHENTICATED_ANONYMOUSLY }
|
|
- { path: '^/(%app_locales%)/admin', roles: ROLE_ADMIN }
|
|
|