Skip to content

Commit

Permalink
Merge pull request #77 from cybex-gmbh/master
Browse files Browse the repository at this point in the history
Allow retrieval of remote dumps on a production system. (#76)
  • Loading branch information
gael-connan-cybex authored Feb 13, 2024
2 parents 9ce2833 + e226249 commit 407f687
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
15 changes: 0 additions & 15 deletions Tests/RemoteDumpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,6 @@ public function failOnMissingServerUrl()
$this->protector->getRemoteDump();
}

/**
* @test
*/
public function failOnProductionEnvironment()
{
$this->app->detectEnvironment(fn() => 'production');

Http::fake([
$this->serverUrl => Http::response(),
]);

$this->expectException(InvalidEnvironmentException::class);
$this->protector->getRemoteDump();
}

/**
* @test
*/
Expand Down
4 changes: 0 additions & 4 deletions src/Protector.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,6 @@ public function getRemoteDump(): string
{
$disk = $this->getDisk();

if (App::environment('production')) {
throw new InvalidEnvironmentException('Retrieving a dump is not allowed on production systems.');
}

if ($this->shouldEncrypt() && !$this->getPrivateKey()) {
throw new InvalidConfigurationException(
'For using Laravel Sanctum a crypto keypair is required. There was none found in your .env file.'
Expand Down

0 comments on commit 407f687

Please sign in to comment.