<?php

/**
 * @param $alias
 *
 * @return bool
 */
function isActionAllowed($alias)
{
    $ci = &get_instance();
    $ci->load->model('rbac_model');
    $permissions = $ci->rbac_model->getUserPermissions();
    $allowedAliases = array_column($permissions, 'alias');
    return in_array($alias, $allowedAliases);
}

