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