]> Raphaël G. Git Repositories - recipe/blob - rapsys/airbundle/master/config/packages/rapsys_air.yaml
Fix controller naming
[recipe] / rapsys / airbundle / master / config / packages / rapsys_air.yaml
1 #RapsysAir configuration
2 rapsys_air:
3 #Contact
4 contact:
5 name: 'Raphaël Gertz'
6 mail: 'airlibre@rapsys.eu'
7 #Copyright
8 copy:
9 long: 'Raphaël Gertz all rights reserved'
10 short: 'Copyright 2019'
11
12 #RapsysUser configuration
13 rapsys_user:
14 #Class replacement
15 class:
16 group: 'Rapsys\AirBundle\Entity\Group'
17 title: 'Rapsys\AirBundle\Entity\Title'
18 user: 'Rapsys\AirBundle\Entity\User'
19 #Route replacement
20 route:
21 homepage:
22 name: 'rapsys_air_homepage'
23 #Contact replacement
24 contact:
25 name: '%rapsys_air.contact.name%'
26 mail: '%rapsys_air.contact.mail%'
27 #Login replacement
28 login:
29 view:
30 name: '@RapsysAir/form/login.html.twig'
31 context:
32 title: 'Login'
33 #Recover replacement
34 recover:
35 view:
36 name: '@RapsysAir/form/recover.html.twig'
37 context:
38 title: 'Recover'
39 mail:
40 subject: '%%recipient_name%% welcome back to %%site_title%%'
41 html: '@RapsysAir/mail/recover.html.twig'
42 text: '@RapsysAir/mail/recover.text.twig'
43 route:
44 homepage: 'site_url'
45 recover_mail: 'recover_url'
46 context:
47 copy_long: '%rapsys_air.copy.long%'
48 copy_short: '%rapsys_air.copy.short%'
49 site_logo: '%rapsys_air.site.logo%'
50 site_title: '%rapsys_air.site.title%'
51 #Mail recover replacement
52 recover_mail:
53 view:
54 name: '@RapsysAir/form/recover_mail.html.twig'
55 context:
56 title: 'Mail recover'
57 mail:
58 subject: '%%recipient_name%% welcome back to %%site_title%%'
59 html: '@RapsysAir/mail/recover_mail.html.twig'
60 text: '@RapsysAir/mail/recover_mail.text.twig'
61 route:
62 homepage: 'site_url'
63 recover_mail: 'recover_url'
64 context:
65 copy_long: '%rapsys_air.copy.long%'
66 copy_short: '%rapsys_air.copy.short%'
67 site_logo: '%rapsys_air.site.logo%'
68 site_title: '%rapsys_air.site.title%'
69 #Register replacement
70 register:
71 view:
72 form: 'Rapsys\AirBundle\Form\RegisterType'
73 name: '@RapsysAir/form/register.html.twig'
74 context:
75 title: 'Register'
76 mail:
77 subject: '%%recipient_name%% welcome to %%site_title%%'
78 html: '@RapsysAir/mail/register.html.twig'
79 text: '@RapsysAir/mail/register.text.twig'
80 route:
81 homepage: 'site_url'
82 context:
83 copy_long: '%rapsys_air.copy.long%'
84 copy_short: '%rapsys_air.copy.short%'
85 site_logo: '%rapsys_air.site.logo%'
86 site_title: '%rapsys_air.site.title%'
87
88 #Doctrine configuration
89 doctrine:
90 #Orm configuration
91 orm:
92 #Force resolution of UserBundle entities to AirBundle one
93 #XXX: without these lines, relations are lookup in parent namespace ignoring AirBundle extension
94 resolve_target_entities:
95 Rapsys\UserBundle\Entity\Group: Rapsys\AirBundle\Entity\Group
96 Rapsys\UserBundle\Entity\Title: Rapsys\AirBundle\Entity\Title
97 Rapsys\UserBundle\Entity\User: Rapsys\AirBundle\Entity\User
98
99 #Security configuration
100 security:
101 #Set encoders
102 encoders:
103 #Rapsys\AirBundle\Entity\User: plaintext
104 Rapsys\AirBundle\Entity\User:
105 algorithm: 'bcrypt'
106
107 #Set providers
108 providers:
109 database:
110 entity:
111 class: Rapsys\AirBundle\Entity\User
112 property: mail
113
114 #Set firewall
115 firewalls:
116 #Disables authentication for assets and the profiler, adapt it according to your needs
117 dev:
118 pattern: ^/(_(profiler|wdt)|css|images|js)/
119 security: false
120
121 main:
122 #Allow anonymous access
123 anonymous: ~
124
125 #Disable logout on user change
126 logout_on_user_change: true
127
128 #Activate database provider
129 provider: database
130
131 #XXX: https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
132 #http_basic: ~
133
134 #Set form login
135 #XXX: https://symfony.com/doc/current/security/form_login_setup.html
136 form_login:
137 use_referer: false
138 login_path: rapsys_user_login
139 check_path: rapsys_user_login
140 username_parameter: 'login[mail]'
141 password_parameter: 'login[password]'
142
143 #Set logout route
144 logout:
145 path: /logout
146 target: /
147
148 #Set custom access denied handler
149 access_denied_handler: Rapsys\AirBundle\Security\AccessDeniedHandler
150
151 #Set role hierarchy
152 role_hierarchy:
153 ROLE_GUEST: [ 'ROLE_USER' ]
154 ROLE_REGULAR: [ 'ROLE_USER', 'ROLE_GUEST' ]
155 ROLE_SENIOR: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR' ]
156 ROLE_ADMIN: [ 'ROLE_USER', 'ROLE_GUEST', 'ROLE_REGULAR', 'ROLE_SENIOR' ]
157
158 #Service configuration
159 services:
160 #Register twig file_get_contents extension
161 #XXX: obsolete by email.image twig filter in "twig/extensions" or "twig/html-extra"
162 rapsys_air.twig.file_get_contents:
163 class: Rapsys\AirBundle\Twig\FileGetContentsExtension
164 tags: [ 'twig.extension' ]
165 #Register twig base64 extension
166 rapsys_air.twig.base64:
167 class: Rapsys\AirBundle\Twig\Base64Extension
168 tags: [ 'twig.extension' ]
169 #Register twig bb2html extension
170 rapsys_air.twig.bb2html:
171 class: Rapsys\AirBundle\Twig\Bb2htmlExtension
172 tags: [ 'twig.extension' ]
173 #Register default controller
174 Rapsys\AirBundle\Controller\DefaultController:
175 arguments: [ '@service_container', '@translator' ]
176 autowire: true
177 tags: [ 'controller.service_arguments' ]
178 #Register access denied handler
179 Rapsys\AirBundle\Security\AccessDeniedHandler:
180 arguments: [ '@service_container', '@translator', '@twig' ]
181 #Register air fixtures
182 Rapsys\AirBundle\DataFixtures\AirFixtures:
183 tags: [ 'doctrine.fixture.orm' ]
184
185 #Twig Configuration
186 twig:
187 #Fix form layout for css
188 form_theme: [ '@RapsysAir/form/form_div_layout.html.twig' ]