Skip to content

Commit

Permalink
whoopes, abort before the query is made
Browse files Browse the repository at this point in the history
  • Loading branch information
fredbradley committed Oct 14, 2024
1 parent 913beb2 commit a5d65b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Domains/SelfReflection/Http/LookupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ class LookupController
{
public function __invoke(int $reportCycle): RedirectResponse
{
$pupilData = new PupilData();
if (auth()->user()->isStaff()) {
abort(403, 'This page is intended for pupils and parents only. Staff should use the self-reflection page withing their Teaching Set in the pastoral module.');
}

$pupilData = new PupilData();


return redirect()->route('selfreflection.showget', ['reportCycle' => $reportCycle, 'pupilId' => $pupilData->pupil_id]);

Expand Down

0 comments on commit a5d65b9

Please sign in to comment.