Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADE-4.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ SecurityBundle
--------------

* The `logout_on_user_change` firewall option is deprecated.
* The `switch_user.stateless` firewall option is deprecated, use the `stateless` option instead.
* The `SecurityUserValueResolver` class is deprecated, use
`Symfony\Component\Security\Http\Controller\UserValueResolver` instead.

Expand Down
1 change: 1 addition & 0 deletions UPGRADE-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ SecurityBundle
--------------

* The `logout_on_user_change` firewall option has been removed.
* The `switch_user.stateless` firewall option has been removed.
* The `SecurityUserValueResolver` class has been removed.

Translation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
->scalarNode('provider')->end()
->scalarNode('parameter')->defaultValue('_switch_user')->end()
->scalarNode('role')->defaultValue('ROLE_ALLOWED_TO_SWITCH')->end()
->booleanNode('stateless')->defaultValue(false)->end()
->booleanNode('stateless')
->setDeprecated('The "%path%.%node%" configuration key has been deprecated in Symfony 4.1.')
->defaultValue(false)
->end()
->end()
->end()
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function testFirewalls()
array(
'parameter' => '_switch_user',
'role' => 'ROLE_ALLOWED_TO_SWITCH',
'stateless' => true,
'stateless' => false,
),
),
array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
'http_basic' => true,
'form_login' => true,
'anonymous' => true,
'switch_user' => array('stateless' => true),
'switch_user' => true,
'x509' => true,
'remote_user' => true,
'logout' => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'http_basic' => true,
'form_login' => true,
'anonymous' => true,
'switch_user' => array('stateless' => true),
'switch_user' => true,
'x509' => true,
'remote_user' => true,
'logout' => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<http-basic />
<form-login />
<anonymous />
<switch-user stateless="true" />
<switch-user />
<x509 />
<remote-user />
<user-checker />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<http-basic />
<form-login />
<anonymous />
<switch-user stateless="true" />
<switch-user />
<x509 />
<remote-user />
<user-checker />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ security:
form_login: true
anonymous: true
switch_user:
stateless: true
x509: true
remote_user: true
logout: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ security:
http_basic: true
form_login: true
anonymous: true
switch_user:
stateless: true
switch_user: true
x509: true
remote_user: true
logout: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function testSwitchUserNotStatelessOnStatelessFirewall()
'some_firewall' => array(
'stateless' => true,
'http_basic' => null,
'switch_user' => array('stateless' => false),
'switch_user' => true,
),
),
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ security:
user_can_switch: { password: test, roles: [ROLE_USER, ROLE_ALLOWED_TO_SWITCH] }
firewalls:
main:
stateless: true
switch_user:
parameter: X-Switch-User
stateless: true