36274-vm/admin/auth.php
Flatlogic Bot 76b95bec18 v1
2025-11-25 15:04:51 +00:00

10 lines
338 B
PHP

<?php
require_once __DIR__ . '/../auth.php';
// Role-based access control
if (!isset($_SESSION['role']) || !in_array($_SESSION['role'], ['admin', 'super_admin'])) {
// If the user is not an admin, show an error and stop execution.
http_response_code(403);
die("Forbidden: You do not have permission to access this page.");
}