Only admins can change ticket status

This commit is contained in:
Jérémy Munsch 2021-05-18 19:33:36 +02:00
parent 39dfb703f4
commit 59bb0a3fbd

View file

@ -7,6 +7,17 @@ use Illuminate\Foundation\Http\FormRequest;
class ChangeTicketStatus extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return auth()->check() and
auth()->user()->role === 1;
}
/**
* Get the validation rules that apply to the request.
*