Skip to content

Commit 41681d0

Browse files
committed
disable site check for now
1 parent 635f87f commit 41681d0

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/Http/Controllers/AuthController.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ public function handleProviderCallback(Request $request): HttpRedirectResponse
3030
}
3131

3232
$user = Socialite::driver('ikoncept')->user();
33-
$has_access = false;
33+
$has_access = true;
3434
$app_redirect = config('services.ikoncept.redirect');
35-
$sites = $user->user['sites'];
35+
// $sites = $user->user['sites'];
3636

37-
if (in_array($app_redirect, $sites)) {
38-
$has_access = true;
39-
}
37+
// if (in_array($app_redirect, $sites)) {
38+
// $has_access = true;
39+
// }
4040

41-
if (in_array('*', $sites)) {
42-
$has_access = true;
43-
}
41+
// if (in_array('*', $sites)) {
42+
// $has_access = true;
43+
// }
4444

45-
// Banned from everything
46-
if (in_array('!', $sites)) {
47-
$has_access = false;
48-
}
45+
// // Banned from everything
46+
// if (in_array('!', $sites)) {
47+
// $has_access = false;
48+
// }
4949

50-
if (! $has_access) {
51-
return redirect()->route('login')
52-
->with('permissionError', 'Du har inte behörighet till denna applikationen');
53-
}
50+
// if (! $has_access) {
51+
// return redirect()->route('login')
52+
// ->with('permissionError', 'Du har inte behörighet till denna applikationen');
53+
// }
5454

5555
if (auth()->guest()) {
5656
$userModel = config('ikoncept-oauth.user_model');

0 commit comments

Comments
 (0)