mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 22:03:44 +02:00
Merge branch 'develop' into v2
This commit is contained in:
@@ -27,6 +27,18 @@ class WebsocketControllerTest extends ClientApiIntegrationTestCase
|
||||
->assertJsonPath('errors.0.detail', 'You do not have permission to connect to this server\'s websocket.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Confirm users cannot access the websocket for another user's server.
|
||||
*/
|
||||
public function testUserWithoutPermissionForServerReceivesError()
|
||||
{
|
||||
[, $server] = $this->generateTestAccount([Permission::ACTION_WEBSOCKET_CONNECT]);
|
||||
[$user,] = $this->generateTestAccount([Permission::ACTION_WEBSOCKET_CONNECT]);
|
||||
|
||||
$this->actingAs($user)->getJson("/api/client/servers/{$server->uuid}/websocket")
|
||||
->assertStatus(Response::HTTP_NOT_FOUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that the expected permissions are returned for the server owner and that the JWT is
|
||||
* configured correctly.
|
||||
|
||||
Reference in New Issue
Block a user