]> Raphaƫl G. Git Repositories - treebundle/blob - config/packages/rapsystree.yaml
Add repository factory
[treebundle] / config / packages / rapsystree.yaml
1 # Parameters configuration
2 parameters:
3
4 # RapsysTree configuration
5 rapsystree:
6 contact:
7 address: 'veranda@rapsys.eu'
8 name: 'Rapsys Photo'
9 languages:
10 en_gb: 'English'
11 fr_fr: 'French'
12 locale: 'fr_fr'
13 locales: [ 'fr_fr', 'en_gb' ]
14 logo:
15 alt: 'Rapsys photo''s logo'
16 title: 'Rapsys Photo'
17 roots:
18 Dcim: '/var/www/dcim'
19 Doc: '/var/www/doc'
20 Photo: '/var/www/photo'
21 Tango: '/var/www/tango'
22 Video: '/var/www/video'
23
24 # RapsysUser configuration
25 rapsysuser:
26 # Class replacement
27 class:
28 group: 'Rapsys\TreeBundle\Entity\Group'
29 civility: 'Rapsys\TreeBundle\Entity\Civility'
30 user: 'Rapsys\TreeBundle\Entity\User'
31 # Default replacement
32 default:
33 admin: 'ROLE_ADMIN'
34 civility: 'Mister'
35 group: [ 'User' ]
36 languages: '%rapsystree.languages%'
37 # Default context
38 context:
39 site: '%rapsystree.title%'
40 # Route replacement
41 route:
42 home:
43 name: 'rapsystree'
44 context: []
45
46 # Doctrine configuration
47 doctrine:
48 # Dbal configuration
49 dbal:
50 charset: 'utf8mb4'
51 default_table_options:
52 charset: 'utf8mb4'
53 collate: 'utf8mb4_unicode_ci'
54 # Orm configuration
55 orm:
56 # Replace repository factory
57 repository_factory: 'Rapsys\TreeBundle\Factory'
58
59 #Resolve UserBundle entities with TreeBundle one
60 #XXX: without these lines, relations are lookup in parent namespace ignoring TreeBundle extension
61 resolve_target_entities:
62 Rapsys\UserBundle\Entity\Group: 'Rapsys\TreeBundle\Entity\Group'
63 Rapsys\UserBundle\Entity\Civility: 'Rapsys\TreeBundle\Entity\Civility'
64 Rapsys\UserBundle\Entity\User: 'Rapsys\TreeBundle\Entity\User'
65
66 # Security configuration
67 security:
68 # Set firewall
69 firewalls:
70 # Disables authentication for assets and the profiler, adapt it according to your needs
71 dev:
72 pattern: '^/(_(profiler|wdt)|css|images|js)/'
73 security: false
74
75 # Mail firewall
76 main:
77 # Allow anonymous access
78 #anonymous: ~
79 #lazy: true
80
81 # Activate database provider
82 #XXX: comment this key in config/security.yaml to prevent users_in_memory induced failures
83 provider: 'database'
84
85 # Activate user checker
86 user_checker: 'security.user_checker'
87
88 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
89 #http_basic: ~
90
91 # Set form login
92 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
93 #TODO: https://symfony.com/doc/current/security/guard_authentication.html
94 form_login:
95 # Redirect to referer if different from login route
96 use_referer: true
97 # Login path
98 login_path: 'rapsysuser_login'
99 # Check path
100 check_path: 'rapsysuser_login'
101 # Username parameter
102 username_parameter: 'login[mail]'
103 # Password parameter
104 password_parameter: 'login[password]'
105 # Enable login csrf protection
106 enable_csrf: false
107 # Csrf parameter
108 csrf_parameter: 'login[_token]'
109 # Csrf id
110 csrf_token_id: 'login'
111
112 # Set logout route
113 logout:
114 # Logout route
115 path: 'rapsysuser_logout'
116 # Logout default target
117 target: 'rapsystree'
118
119 # Set custom access denied handler
120 #access_denied_handler: Rapsys\BlogBundle\Handler\AccessDeniedHandler
121
122 # Remember me
123 #XXX: see https://symfony.com/doc/current/security/remember_me.html
124 remember_me:
125 # Use APP_SECRET
126 secret: '%kernel.secret%'
127 # Always remember me
128 always_remember_me: true
129
130 # Set password hashers
131 password_hashers:
132 #XXX: comment this key in config/security.yaml to prevent users_in_memory induced failures
133 #TODO: see https://symfony.com/doc/current/security/passwords.html (sodium ? + upgrade)
134 Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
135 #Rapsys\TreeBundle\Entity\User:
136 algorithm: 'sodium'
137 migrate_from:
138 - 'bcrypt'
139 - 'plaintext'
140
141 # Set providers
142 providers:
143 database:
144 entity:
145 class: 'Rapsys\TreeBundle\Entity\User'
146 property: 'mail'
147
148 # Set role hierarchy
149 role_hierarchy:
150 ROLE_USER: [ 'ROLE_GUEST' ]
151 ROLE_ADMIN: [ 'ROLE_GUEST', 'ROLE_USER' ]
152
153 # Services configuration
154 services:
155 # Register tree controller
156 Rapsys\TreeBundle\Controller\TreeController:
157 arguments: [ '@service_container', '@router', '@request_stack', '@translator', '@twig' ]
158 tags: [ 'controller.service_arguments' ]
159 # Register tree repository factory
160 Rapsys\TreeBundle\Factory:
161 arguments: [ '@service_container', '@request_stack', '@router', '@rapsyspack.slugger_util', '@translator', '%rapsystree.locale%', '%rapsystree.languages%' ]
162 #Register blog fixture
163 Rapsys\TreeBundle\Fixture\TreeFixture:
164 arguments: [ '@service_container' ]
165 tags: [ 'doctrine.fixture.orm' ]
166
167 # Twig Configuration
168 twig:
169 # Enforce debug
170 #auto_reload: ~
171 debug: '%kernel.debug%'
172 #strict_variables: '%kernel.debug%'
173
174 # Disable cache
175 # XXX: enable forced regeneration of css and js at each page load
176 cache: false
177
178 # Fix form layout for css
179 # XXX: @RapsysTree is a shortcut to vendor/rapsys/treebundle/Resources/views directory here
180 #form_theme: [ '@RapsysTree/form/form_div_layout.html.twig' ]
181
182 # Set twig paths
183 paths:
184 # Required by email.image(site_logo) directive
185 # XXX: Allow twig to resolve @RapsysTree/png/logo.png in vendor/rapsys/treebundle/public/png/logo.png
186 '%kernel.project_dir%/vendor/rapsys/treebundle/public': 'RapsysTree'
187 #'%kernel.project_dir%/vendor/rapsys/userbundle/public': 'RapsysUser'
188 # Override default exception controller
189 #exception_controller: Rapsys\TreeBundle\Controller\ErrorController::preview