Apply suggestion
Co-authored-by: Krzysztof Rewak <krzysztof.rewak@gmail.com>
This commit is contained in:
parent
9e935c4fbf
commit
cd537d1889
@ -13,8 +13,8 @@ class CreateVacationRequestRequest extends FormRequest
|
|||||||
|
|
||||||
public function authorize(): bool
|
public function authorize(): bool
|
||||||
{
|
{
|
||||||
return null === $this->get("user") ||
|
return ($this->get("user") === null) ||
|
||||||
(int)$this->get("user") === $this->user()->id ||
|
((int)$this->get("user") === $this->user()->id) ||
|
||||||
$this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
|
$this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user