* wip * wip * wip * wip * wip * wip * wip * #5 - bump dependencies * #43 - wip * #43 - add composer script * #43 - fix * #43 - fix * #43 - wip * #43 - ecs fix * #43 - cr fix * #43 - cr fix * #43 - fix * #62 - wip * #62 - wip * #62 - wip * #62 - fix * #62 - fix * #62 - fix * #62 - fix * #62 - fix * #62 - ecs fix Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
This commit is contained in:
@@ -10,6 +10,11 @@ use Toby\Eloquent\Models\VacationRequest;
|
||||
|
||||
class VacationRequestPolicy
|
||||
{
|
||||
public function listAll(User $user): bool
|
||||
{
|
||||
return in_array($user->role, [Role::AdministrativeApprover, Role::TechnicalApprover], true);
|
||||
}
|
||||
|
||||
public function createOnBehalfOfEmployee(User $user): bool
|
||||
{
|
||||
return $user->role === Role::AdministrativeApprover;
|
||||
|
Reference in New Issue
Block a user