import { createClient } from "@/lib/supabase/server" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table" import { Button } from "@/components/ui/button" import { Plus, UserCog } from "lucide-react" import Link from "next/link" import { Badge } from "@/components/ui/badge" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" export default async function UsersPage() { const supabase = await createClient() const { data: profiles } = await supabase .from('profiles') .select('*') .order('created_at', { ascending: false }) // We might also want to get email from auth.users, but we can't join that easily with RLS/client. // However, usually profiles table should have email or we just show name. // In the schema, profiles has: id, role, full_name. No email. // This is a limitation. We can only show what's in profiles. // Unless we have a way to query auth.users (requires admin). return (
Sisteme erişimi olan kullanıcıları yönetin.