<?php
function gp_require_staff_access(PDO $pdo): void
{
    $role = function_exists('gp_user_role') ? gp_user_role($pdo) : '';
    if (!(gp_is_full_project_access_role($role) || gp_is_secretary_like_role($role))) {
        http_response_code(403);
        exit('Access denied.');
    }
}

function gp_require_admin_like_access(PDO $pdo): void
{
    $role = function_exists('gp_user_role') ? gp_user_role($pdo) : '';
    if (!gp_is_full_project_access_role($role)) {
        http_response_code(403);
        exit('Access denied.');
    }
}
