diff --git a/app/Http/Requests/ChangeTicketStatus.php b/app/Http/Requests/ChangeTicketStatus.php index 4d681d0..f66afef 100644 --- a/app/Http/Requests/ChangeTicketStatus.php +++ b/app/Http/Requests/ChangeTicketStatus.php @@ -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. *