Skip to content

Commit

Permalink
show 403 and error page when staff member tries to use pupil page
Browse files Browse the repository at this point in the history
  • Loading branch information
fredbradley committed Oct 14, 2024
1 parent 293e7a6 commit 913beb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Domains/SelfReflection/Http/LookupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ 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.');
}


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

Expand Down

0 comments on commit 913beb2

Please sign in to comment.