File tree Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Expand file tree Collapse file tree 4 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ security:
71
71
72
72
# The ROLE_ADMIN role inherits from the ROLE_USER role
73
73
role_hierarchy :
74
- !php/const App\Entity\User:: ROLE_ADMIN: !php/const App\Entity\User:: ROLE_USER
74
+ ROLE_ADMIN : ROLE_USER
75
75
76
76
when@test :
77
77
# this configuration simplifies testing URLs protected by the security mechanism
Original file line number Diff line number Diff line change 4
4
- ' form/layout.html.twig'
5
5
- ' form/fields.html.twig'
6
6
7
- # The following variables are available in all Twig templates
8
- globals :
9
- # We can use PHP constants (native PHP ones or from the application) thanks
10
- # to the !php/const syntax.
11
- ROLE_USER : !php/const App\Entity\User::ROLE_USER
12
- ROLE_ADMIN : !php/const App\Entity\User::ROLE_ADMIN
13
-
14
7
when@test :
15
8
twig :
16
9
strict_variables : true
Original file line number Diff line number Diff line change 55
55
</a >
56
56
</li >
57
57
58
- {% if is_granted(ROLE_ADMIN ) %}
58
+ {% if is_granted(' ROLE_ADMIN' ) %}
59
59
<li >
60
60
<a href =" {{ path(' admin_post_index' ) }}" >
61
61
<i class =" fa fa-lock" aria-hidden =" true" ></i > {{ ' menu.admin' | trans }}
Original file line number Diff line number Diff line change 67
67
<tr >
68
68
<td >john_user</td >
69
69
<td >kitten</td >
70
- <td ><code >{{ ROLE_USER }} </code > ({{ ' help.role_user' | trans }})</td >
70
+ <td ><code >ROLE_USER</code > ({{ ' help.role_user' | trans }})</td >
71
71
<td >
72
72
<button class =" btn btn-primary btn-sm" {{ stimulus_action(' login' , ' prefillJohnUser' ) }}><i class =" fa fa-user" ></i ></button >
73
73
</td >
74
74
</tr >
75
75
<tr >
76
76
<td >jane_admin</td >
77
77
<td >kitten</td >
78
- <td ><code >{{ ROLE_ADMIN }} </code > ({{ ' help.role_admin' | trans }})</td >
78
+ <td ><code >ROLE_ADMIN</code > ({{ ' help.role_admin' | trans }})</td >
79
79
<td >
80
80
<button class =" btn btn-primary btn-sm" {{ stimulus_action(' login' , ' prefillJaneAdmin' ) }}><i class =" fa fa-user" ></i ></button >
81
81
</td >
You can’t perform that action at this time.
0 commit comments