<?php

/**
 * Description of IndexController
 *
 * @author Arkadiusz Rychlik <a.rychlik at eppe.com.pl>
 */
class Main_Users_Controller_Admin_IndexController extends Eppe_Crud_Controller_Action {

	protected $crud = 'Users_CRUD_User';
	protected $grid = 'Users_Jqgrid_User';
	protected $beanName = 'user';
	protected $multiLang = false;
        
	protected function _extraTransformRow($row, $bean) {
		foreach (R::find('role') as $role) {
			if (!empty($bean->sharedRole[$role['id']]))
				$row[$role->id] = true;
			else
				$row[$role->id] = false;
		}

		return $row;
	}

}
