@@ -717,7 +717,7 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
717
717
718
718
# or require ROLE_ADMIN and IS_AUTHENTICATED_FULLY for /admin*
719
719
- { path: '^/admin', roles: [IS_AUTHENTICATED_FULLY, ROLE_ADMIN] }
720
-
720
+
721
721
# the 'path' value can be any valid regular expression
722
722
# (this one will match URLs like /api/post/7298 and /api/comment/528491)
723
723
- { path: ^/api/(post|comment)/\d+$, roles: ROLE_USER }
@@ -742,6 +742,12 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
742
742
<!-- require ROLE_ADMIN for /admin* -->
743
743
<rule path =" ^/admin" role =" ROLE_ADMIN" />
744
744
745
+ <!-- require ROLE_ADMIN and IS_AUTHENTICATED_FULLY for /admin* -->
746
+ <rule path =" ^/admin" >
747
+ <role >ROLE_ADMIN</role >
748
+ <role >IS_AUTHENTICATED_FULLY</role >
749
+ </rule >
750
+
745
751
<!-- the 'path' value can be any valid regular expression
746
752
(this one will match URLs like /api/post/7298 and /api/comment/528491) -->
747
753
<rule path =" ^/api/(post|comment)/\d+$" role =" ROLE_USER" />
@@ -764,6 +770,9 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
764
770
// require ROLE_ADMIN for /admin*
765
771
['path' => '^/admin', 'roles' => 'ROLE_ADMIN'],
766
772
773
+ // require ROLE_ADMIN and IS_AUTHENTICATED_FULLY for /admin*
774
+ ['path' => '^/admin', 'roles' => ['ROLE_ADMIN', 'IS_AUTHENTICATED_FULLY']],
775
+
767
776
// the 'path' value can be any valid regular expression
768
777
// (this one will match URLs like /api/post/7298 and /api/comment/528491)
769
778
['path' => '^/api/(post|comment)/\d+$', 'roles' => 'ROLE_USER'],
0 commit comments