protected function _rolePermissions($roleId)
    {
        $Acos = TableRegistry::get('User.Acos');
        $Permissions = TableRegistry::get('User.Permissions');
        $out = [];
        $acoIds = $Permissions
            ->find()
            ->select(['aco_id'])
            ->where(['role_id' => $roleId])
            ->all()
            ->extract('aco_id')
            ->toArray();

        foreach ($acoIds as $acoId) {
            $path = $Acos->find('path', ['for' => $acoId]);

            if (!$path) {
                continue;
            }

            $path = implode('/', $path->extract('alias')->toArray());
            if ($path) {
                $out[$path] = true;
            }
        }

        return $out;
    }