Merge pull request 'Pembatasan Chrome dibatalkan' (#130) from development into main
Reviewed-on: #130
This commit was merged in pull request #130.
This commit is contained in:
@@ -10,6 +10,7 @@ use Illuminate\Support\Facades\Auth;
|
|||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use Illuminate\Support\Facades\Session;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
class UntanSSO
|
class UntanSSO
|
||||||
@@ -76,10 +77,17 @@ class UntanSSO
|
|||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::where('email', $ssoData['email'] ?? '')->with('teams')->first();
|
$email = $ssoData['email'] ?? '';
|
||||||
|
$user = $email !== '' ? User::where('email', $email)->with('teams')->first() : null;
|
||||||
|
|
||||||
if (! $user) {
|
if (! $user) {
|
||||||
Log::info('[SSO] email tidak terdaftar: ' . ($ssoData['email'] ?? '-'));
|
Log::info('[SSO] email tidak terdaftar: ' . ($email ?: '-'));
|
||||||
|
|
||||||
|
// now(): hanya untuk request ini, agar peringatan tidak terbawa setelah akun portal diganti
|
||||||
|
if ($email !== '') {
|
||||||
|
Session::now('sso_belum_terdaftar',"Akun email {$email} belum terdaftar sebagai user Verifikator");
|
||||||
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -33,8 +33,9 @@ return [
|
|||||||
|
|
||||||
'login_mode' => (int) env('LOGIN_MODE', 1),
|
'login_mode' => (int) env('LOGIN_MODE', 1),
|
||||||
|
|
||||||
// Batasi akses web hanya untuk Google Chrome (set CHROME_ONLY=false untuk menonaktifkan).
|
// Batasi akses web hanya untuk Google Chrome. Sementara dinonaktifkan;
|
||||||
'chrome_only' => (bool) env('CHROME_ONLY', true),
|
// set CHROME_ONLY=true (atau kembalikan default ke true) untuk mengaktifkan lagi.
|
||||||
|
'chrome_only' => (bool) env('CHROME_ONLY', false),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -110,6 +110,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
|
@if (session('sso_belum_terdaftar'))
|
||||||
|
<div role="alert" class="rounded-xl bg-amber-50 border p-3.5 text-xs text-amber-900 font-semibold leading-relaxed flex items-start gap-2.5" style="border-color: #fcd34d;">
|
||||||
|
<i class="fas fa-triangle-exclamation text-amber-600 text-sm mt-0.5 shrink-0"></i>
|
||||||
|
<div class="min-w-0" style="overflow-wrap: anywhere;">{{ session('sso_belum_terdaftar') }}</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<a href="https://portal.untan.ac.id/login?next={{ urlencode(url('/dashboard')) }}"
|
<a href="https://portal.untan.ac.id/login?next={{ urlencode(url('/dashboard')) }}"
|
||||||
class="w-full py-2.5 px-4 text-xs sm:text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 active:bg-blue-800 rounded-lg shadow-md shadow-blue-600/30 hover:shadow-blue-600/40 hover:-translate-y-0.5 active:translate-y-0 transition-all duration-200 flex items-center justify-center gap-2.5 group">
|
class="w-full py-2.5 px-4 text-xs sm:text-sm font-bold text-white bg-blue-600 hover:bg-blue-700 active:bg-blue-800 rounded-lg shadow-md shadow-blue-600/30 hover:shadow-blue-600/40 hover:-translate-y-0.5 active:translate-y-0 transition-all duration-200 flex items-center justify-center gap-2.5 group">
|
||||||
<i class="fas fa-university text-sm transition-transform group-hover:scale-110"></i>
|
<i class="fas fa-university text-sm transition-transform group-hover:scale-110"></i>
|
||||||
|
|||||||
Reference in New Issue
Block a user