@@ -716,8 +716,8 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
716
716
- { path: ^/admin, roles: ROLE_ADMIN }
717
717
718
718
# the 'path' value can be any valid regular expression
719
- # (this one will match URLs like /api/entity1/528491 and /api/entity2 /528491)
720
- - { path: ^/api/(entity1|entity2 )/\d+$, roles: ROLE_USER }
719
+ # (this one will match URLs like /api/post/7298 and /api/comment /528491)
720
+ - { path: ^/api/(post|comment )/\d+$, roles: ROLE_USER }
721
721
722
722
.. code-block :: xml
723
723
@@ -740,8 +740,8 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
740
740
<rule path =" ^/admin" role =" ROLE_ADMIN" />
741
741
742
742
<!-- the 'path' value can be any valid regular expression
743
- (this one will match URLs like /api/entity1/528491 and /api/entity2 /528491) -->
744
- <rule path =" ^/api/(entity1|entity2 )/\d+$" role =" ROLE_USER" />
743
+ (this one will match URLs like /api/post/7298 and /api/comment /528491) -->
744
+ <rule path =" ^/api/(post|comment )/\d+$" role =" ROLE_USER" />
745
745
</config >
746
746
</srv : container >
747
747
@@ -762,8 +762,8 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
762
762
['path' => '^/admin', 'role' => 'ROLE_ADMIN'],
763
763
764
764
// the 'path' value can be any valid regular expression
765
- // (this one will match URLs like /api/entity1/528491 and /api/entity2 /528491)
766
- ['path' => '^/api/(entity1|entity2 )/\d+$', 'role' => 'ROLE_USER'],
765
+ // (this one will match URLs like /api/post/7298 and /api/comment /528491)
766
+ ['path' => '^/api/(post|comment )/\d+$', 'role' => 'ROLE_USER'],
767
767
],
768
768
]);
769
769
0 commit comments