mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 12:11:12 -05:00
feat: Implement comprehensive ban enforcement
This commit is contained in:
@@ -110,6 +110,19 @@ function AuthProviderComponent({ children }: { children: React.ReactNode }) {
|
||||
const currentAal = await getSessionAal(session);
|
||||
setAal(currentAal);
|
||||
authLog('[Auth] Current AAL:', currentAal);
|
||||
|
||||
// Check if user is banned
|
||||
const { data: profile } = await supabase
|
||||
.from('profiles')
|
||||
.select('banned')
|
||||
.eq('user_id', session.user.id)
|
||||
.maybeSingle();
|
||||
|
||||
if (profile?.banned) {
|
||||
authWarn('[Auth] Banned user detected, signing out');
|
||||
await supabase.auth.signOut();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
setAal(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user