Only admins can change ticket status
This commit is contained in:
parent
39dfb703f4
commit
59bb0a3fbd
1 changed files with 11 additions and 0 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue