Skip to content

Commit

Permalink
/statistics/member raises error if not auth'd
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhilliard committed May 19, 2022
1 parent c623390 commit f9d2f99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Http/Controllers/StatisticsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@ public function member( StatisticsRequest $r, Customer $cust = null ): RedirectR
$cust = Auth::getUser()->customer;
}

if( $cust == null ) {
abort( 403, "You are not authorised to view this member's graphs." );
}

$grapher = App::make( Grapher::class );

// if the customer is authorised, then so too are all of their virtual and physical interfaces:
Expand Down

0 comments on commit f9d2f99

Please sign in to comment.