Skip to content

Commit 59d2295

Browse files
committed
Merge branch '5.0' into 5.1
* 5.0: Update expressions.rst Update custom_authentication_provider.rst Update access_denied_handler.rst Update access_control.rst
2 parents 9cc88d0 + 33fad5f commit 59d2295

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

security/access_control.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ key:
329329
// the 'role' and 'allow-if' options work like an OR expression, so
330330
// access is granted if the expression is TRUE or the user has ROLE_ADMIN
331331
'roles' => 'ROLE_ADMIN',
332-
'allow_if' => '"127.0.0.1" == request.getClientIp() or request.headers.has('X-Secure-Access')',
332+
'allow_if' => '"127.0.0.1" == request.getClientIp() or request.headers.has("X-Secure-Access")',
333333
],
334334
],
335335
]);

security/access_denied_handler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ configure it under your firewall:
5151
<!-- config/packages/security.xml -->
5252
<config>
5353
<firewall name="main">
54-
<access_denied_handler>App\Security\AccessDeniedHandler</access_denied_handler>
54+
<access-denied-handler>App\Security\AccessDeniedHandler</access-denied-handler>
5555
</firewall>
5656
</config>
5757

security/custom_authentication_provider.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ create a class which implements
307307

308308
class WsseFactory implements SecurityFactoryInterface
309309
{
310-
public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint)
310+
public function create(ContainerBuilder $container, string $id, array $config, string $userProvider, ?string $defaultEntryPoint)
311311
{
312312
$providerId = 'security.authentication.provider.wsse.'.$id;
313313
$container
@@ -563,7 +563,7 @@ in order to put it to use::
563563

564564
class WsseFactory implements SecurityFactoryInterface
565565
{
566-
public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint)
566+
public function create(ContainerBuilder $container, string $id, array $config, string $userProvider, ?string $defaultEntryPoint)
567567
{
568568
$providerId = 'security.authentication.provider.wsse.'.$id;
569569
$container

security/expressions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ accepts an :class:`Symfony\\Component\\ExpressionLanguage\\Expression` object::
1818
public function index()
1919
{
2020
$this->denyAccessUnlessGranted(new Expression(
21-
'"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'
21+
'"ROLE_ADMIN" in role_names or (not is_anonymous() and user.isSuperAdmin())'
2222
));
2323

2424
// ...

0 commit comments

Comments
 (0)