Skip to content

Commit 90c6bea

Browse files
committed
[Security] Allow switching to another user when already switched
1 parent 1898d4f commit 90c6bea

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
@@ -33,15 +33,15 @@ public function testSwitchUser($originalUser, $targetUser, $expectedUser, $expec
3333
$this->assertEquals($expectedUser, $client->getProfile()->getCollector('security')->getUser());
3434
}
3535

36-
public function testSwitchedUserCannotSwitchToOther()
36+
public function testSwitchedUserCanSwitchToOther()
3737
{
3838
$client = $this->createAuthenticatedClient('user_can_switch');
3939

4040
$client->request('GET', '/profile?_switch_user=user_cannot_switch_1');
4141
$client->request('GET', '/profile?_switch_user=user_cannot_switch_2');
4242

43-
$this->assertEquals(500, $client->getResponse()->getStatusCode());
44-
$this->assertEquals('user_cannot_switch_1', $client->getProfile()->getCollector('security')->getUser());
43+
$this->assertEquals(200, $client->getResponse()->getStatusCode());
44+
$this->assertEquals('user_cannot_switch_2', $client->getProfile()->getCollector('security')->getUser());
4545
}
4646

4747
public function testSwitchedUserExit()

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": "^5.5.9|>=7.0.8",
2020
"ext-xml": "*",
2121
"symfony/config": "~3.4|~4.0",
22-
"symfony/security": "~3.4.37|~4.3.10|^4.4.3",
22+
"symfony/security": "~3.4.38|~4.3.10|^4.4.5",
2323
"symfony/dependency-injection": "^3.4.3|^4.0.3",
2424
"symfony/http-kernel": "~3.4|~4.0",
2525
"symfony/polyfill-php70": "~1.0"

0 commit comments

Comments
 (0)