first commit
This commit is contained in:
@ -8,7 +8,9 @@ framework:
|
||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||
# Remove or comment this section to explicitly disable session support.
|
||||
session:
|
||||
handler_id: null
|
||||
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler
|
||||
save_path: '@Redis'
|
||||
gc_probability: null
|
||||
cookie_secure: auto
|
||||
cookie_samesite: lax
|
||||
storage_factory_id: session.storage.factory.native
|
||||
|
@ -1,29 +1,44 @@
|
||||
security:
|
||||
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
||||
password_hashers:
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
||||
Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface:
|
||||
id: 'App\Service\PasswordEncoder'
|
||||
|
||||
providers:
|
||||
users_in_memory: { memory: null }
|
||||
main:
|
||||
entity:
|
||||
class: App\Entity\User
|
||||
property: username
|
||||
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
|
||||
main:
|
||||
lazy: true
|
||||
provider: users_in_memory
|
||||
pattern: ^/
|
||||
provider: main
|
||||
context: maincontext
|
||||
user_checker: App\Service\UserChecker
|
||||
form_login:
|
||||
login_path: app_login
|
||||
check_path: app_login
|
||||
default_target_path: app_home
|
||||
use_referer: true
|
||||
csrf_parameter: _csrf_security_token
|
||||
csrf_token_id: a_private_string
|
||||
|
||||
# activate different ways to authenticate
|
||||
# https://symfony.com/doc/current/security.html#the-firewall
|
||||
logout:
|
||||
invalidate_session: true
|
||||
path: app_kill
|
||||
target: app_home
|
||||
|
||||
# https://symfony.com/doc/current/security/impersonating_user.html
|
||||
# switch_user: true
|
||||
|
||||
# Easy way to control access for large sections of your site
|
||||
# Note: Only the *first* access control that matches will be used
|
||||
access_control:
|
||||
# - { path: ^/admin, roles: ROLE_ADMIN }
|
||||
# - { path: ^/profile, roles: ROLE_USER }
|
||||
- { path: ^/all, roles: [ROLE_ADMIN, ROLE_MODO, ROLE_MASTER, ROLE_MANAGER, ROLE_USER] }
|
||||
- { path: ^/user, roles: [ROLE_USER] }
|
||||
- { path: ^/manager, roles: [ROLE_MANAGER] }
|
||||
- { path: ^/master, roles: [ROLE_MASTER] }
|
||||
- { path: ^/modo, roles: [ROLE_MODO] }
|
||||
- { path: ^/admin, roles: [ROLE_ADMIN] }
|
||||
|
||||
when@test:
|
||||
security:
|
||||
|
@ -1,5 +1,9 @@
|
||||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
form_themes:
|
||||
- 'Form/fields.html.twig'
|
||||
globals:
|
||||
appMasteridentity: '%appMasteridentity%'
|
||||
|
||||
when@test:
|
||||
twig:
|
||||
|
Reference in New Issue
Block a user