mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 13:12:10 +01:00
fix: improve admin security and modal accessibility
- Replace Card-based modal with proper Dialog component in SecurityAlertsTable for better accessibility - Add missing admin role check to threat-analysis endpoint for proper authorization - Implement ARIA attributes, focus management, and semantic structure - Ensure consistent admin security patterns across endpoints
This commit is contained in:
@ -29,7 +29,7 @@ export async function POST(request: NextRequest) {
|
||||
try {
|
||||
const session = await getServerSession(authOptions);
|
||||
|
||||
if (!session?.user || !session.user.isPlatformUser) {
|
||||
if (!session?.user || session.user.role !== "ADMIN") {
|
||||
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user