fix code for confilict
This commit is contained in:
@@ -16,7 +16,6 @@ use App\Http\Requests\V3\Mission\RequestPortal\UpdateRequest;
|
|||||||
use App\Http\Traits\ApiResponse;
|
use App\Http\Traits\ApiResponse;
|
||||||
use App\Models\CMMSMachine;
|
use App\Models\CMMSMachine;
|
||||||
use App\Models\Mission;
|
use App\Models\Mission;
|
||||||
use App\Models\Rahdaran;
|
|
||||||
use App\Models\RahdariPoint;
|
use App\Models\RahdariPoint;
|
||||||
use App\Models\RoadObserved;
|
use App\Models\RoadObserved;
|
||||||
use App\Services\Cartables\Mission\RequestPortalService;
|
use App\Services\Cartables\Mission\RequestPortalService;
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ class DeallocateRequest extends FormRequest
|
|||||||
public function authorize(): bool
|
public function authorize(): bool
|
||||||
{
|
{
|
||||||
return $this->mission->edare_shahri_id == auth()->user()->edarate_shahri_id &&
|
return $this->mission->edare_shahri_id == auth()->user()->edarate_shahri_id &&
|
||||||
in_array($this->mission->state_id, [MissionStates::REQUEST_CREATED->value, MissionStates::PENDING_CONFIRMATION->value]);
|
in_array($this->mission->state_id, [MissionStates::REQUEST_CREATED->value, MissionStates::PENDING_CONFIRMATION->value])
|
||||||
|
|| $this->user()?->username === 'witel';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user