<?php
require_once APPPATH . 'libraries/Cf_REST_Controller.php';

class Rbac_api extends Cf_REST_Controller
{
    public function allowed_permissions_get()
    {
        $this->load->model('rbac_model');
        $allowedPermissions = array_column($this->rbac_model->getUserPermissions(), 'alias');
        $this->respond_ok(json_encode($allowedPermissions));
    } 
}
