Guard directional ticket link writes
This commit is contained in:
@@ -29,6 +29,12 @@ class StoreProjectTicketLink
|
||||
->findOrFail($linkedTicketId);
|
||||
|
||||
return DB::transaction(function () use ($linkedTicket, $user, $ticketLinkTypeId, $ticket): TicketLink {
|
||||
Ticket::query()
|
||||
->whereKey([$ticket->id, $linkedTicket->id])
|
||||
->orderBy('id')
|
||||
->lockForUpdate()
|
||||
->get(['id']);
|
||||
|
||||
$ticketLink = TicketLink::query()
|
||||
->where(function ($query) use ($ticket, $linkedTicket): void {
|
||||
$query
|
||||
|
||||
Reference in New Issue
Block a user