Skip to content

Commit

Permalink
add staff only
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin committed Sep 15, 2024
1 parent 1fa5e43 commit bcf9fad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public function login()
public function loginCallback()
{
$user = Socialite::driver('identity')->user();
if (!in_array('54ZYODX15G2K1M76', $user->user['groups'], true)) {
return redirect()->route('auth.login')->with('error', 'You are not allowed to access this application');
}
$user = User::updateOrCreate([
'remote_id' => $user->getId(),
], [
Expand Down

0 comments on commit bcf9fad

Please sign in to comment.