Skip to content

Commit

Permalink
fix(invite): deleting invitees would result in 403
Browse files Browse the repository at this point in the history
  • Loading branch information
Fenrikur committed Feb 1, 2024
1 parent e03f036 commit 137f435
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Http/Requests/InviteeRemovalRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use App\Models\Application;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;

class InviteeRemovalRequest extends FormRequest
{
Expand All @@ -17,6 +18,6 @@ public function rules(): array
public function authorize(): bool
{
$inviteeApplication = Application::findOrFail($this->get('invitee_id'));
return \Auth::user()->application->id === $inviteeApplication->parent;
return Auth::user()->application->id === $inviteeApplication->parent_id;
}
}

0 comments on commit 137f435

Please sign in to comment.