Fix appointment policy not being called correctly
This commit fixes the appointment policy being called at the wrong time, with the wrong arguments. It also fixes wrong references on the auth service provider, also fixing other issues with poliy usage. Fixes #3 and SPACEJEWEL-HOSTING-59.
This commit is contained in:
@@ -67,7 +67,6 @@ class AppointmentController extends Controller
|
||||
public function updateAppointment(Request $request, $applicationID, $status)
|
||||
{
|
||||
|
||||
$this->authorize('update', Appointment::class);
|
||||
|
||||
$application = Application::find($applicationID);
|
||||
$validStatuses = [
|
||||
@@ -75,6 +74,9 @@ class AppointmentController extends Controller
|
||||
'CONCLUDED'
|
||||
];
|
||||
|
||||
$this->authorize('update', $application->appointment);
|
||||
|
||||
|
||||
|
||||
if (!is_null($application))
|
||||
{
|
||||
|
Reference in New Issue
Block a user