Skip to content

Commit 21c4270

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: [Security] Allow switching to another user when already switched
2 parents 4942820 + 90c6bea commit 21c4270

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/Functional/SwitchUserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ public function testSwitchUser($originalUser, $targetUser, $expectedUser, $expec
2929
$this->assertEquals($expectedUser, $client->getProfile()->getCollector('security')->getUser());
3030
}
3131

32-
public function testSwitchedUserCannotSwitchToOther()
32+
public function testSwitchedUserCanSwitchToOther()
3333
{
3434
$client = $this->createAuthenticatedClient('user_can_switch');
3535

3636
$client->request('GET', '/profile?_switch_user=user_cannot_switch_1');
3737
$client->request('GET', '/profile?_switch_user=user_cannot_switch_2');
3838

39-
$this->assertEquals(500, $client->getResponse()->getStatusCode());
40-
$this->assertEquals('user_cannot_switch_1', $client->getProfile()->getCollector('security')->getUser());
39+
$this->assertEquals(200, $client->getResponse()->getStatusCode());
40+
$this->assertEquals('user_cannot_switch_2', $client->getProfile()->getCollector('security')->getUser());
4141
}
4242

4343
public function testSwitchedUserExit()

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"symfony/security-core": "^4.4",
2525
"symfony/security-csrf": "^4.2|^5.0",
2626
"symfony/security-guard": "^4.2|^5.0",
27-
"symfony/security-http": "^4.4.3"
27+
"symfony/security-http": "^4.4.5"
2828
},
2929
"require-dev": {
3030
"doctrine/doctrine-bundle": "^1.5|^2.0",

0 commit comments

Comments
 (0)