Update ticket fix auth on request
This commit is contained in:
parent
74fcf2f854
commit
abbeb572a8
1 changed files with 3 additions and 4 deletions
|
|
@ -11,11 +11,10 @@ class UpdateTicket extends StoreTicket
|
|||
if (auth()->user()->project_id) {
|
||||
$this->merge([
|
||||
'project_id' => auth()->user()->project_id,
|
||||
'status' => TicketStatus::new()->value,
|
||||
'status' => $this->project->status->value,
|
||||
]);
|
||||
}
|
||||
return auth()->check() or
|
||||
auth()->user()->role === 1 or
|
||||
request()->route()->ticket->created_by === auth()->user()->id;
|
||||
return auth()->check() and (auth()->user()->role === 1 or
|
||||
request()->route()->ticket->created_by === auth()->user()->id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue