We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17d36cd commit 3fc62cfCopy full SHA for 3fc62cf
src/Commands/CronCreateCommand.php
@@ -5,6 +5,7 @@
5
use Cron\Exception\InvalidPatternException;
6
use Cron\Validator\CrontabValidator;
7
use Illuminate\Console\Command;
8
+use Tolacika\CronBundle\CronBundle;
9
use Tolacika\CronBundle\Models\CronJob;
10
11
class CronCreateCommand extends Command
@@ -66,6 +67,10 @@ public function handle()
66
67
// Invalid if can't find through application
68
$this->getApplication()->get($command);
69
70
+ if (!CronBundle::isCommandAllowed($command)) {
71
+ throw new \InvalidArgumentException("Command not allowed");
72
+ }
73
+
74
return $command;
75
});
76
0 commit comments