Add internal support for file denylist on eggs; closes #569
This commit is contained in:
parent
ff21d83e2d
commit
239984f92c
7 changed files with 64 additions and 2 deletions
|
@ -22,6 +22,7 @@ class EggFormRequest extends AdminFormRequest
|
|||
'name' => 'required|string|max:191',
|
||||
'description' => 'nullable|string',
|
||||
'docker_images' => 'required|string',
|
||||
'file_denylist' => 'string',
|
||||
'startup' => 'required|string',
|
||||
'config_from' => 'sometimes|bail|nullable|numeric',
|
||||
'config_stop' => 'required_without:config_from|nullable|string|max:191',
|
||||
|
@ -43,7 +44,7 @@ class EggFormRequest extends AdminFormRequest
|
|||
public function withValidator($validator)
|
||||
{
|
||||
$validator->sometimes('config_from', 'exists:eggs,id', function () {
|
||||
return (int) $this->input('config_from') !== 0;
|
||||
return (int)$this->input('config_from') !== 0;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue