<?php
function has_permission($permission) {
    if (isset($_SESSION['user']['permissions']) && in_array($permission, $_SESSION['user']['permissions'])) {
        return true;
    }
    return false;
}
