10 lines
338 B
PHP
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.");
|
|
}
|