<?php
require_once __DIR__ . '/config/config.php';
require_once __DIR__ . '/core/database.php';

try {
    $stmt = db()->query("SELECT name, display_name FROM permissions ORDER BY name");
    $perms = $stmt->fetchAll(PDO::FETCH_ASSOC);
    foreach ($perms as $p) {
        echo $p['name'] . " - " . $p['display_name'] . "\n";
    }
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
