<?php
namespace carabi_office;

/**
 * Домашняя страница -- показывается только неавторизованным пользователям.
 * @author sasha
 */
class pagehandler_homepage extends \SimplePagehandler {
	public function process() {
		//авторизованных перенаправим на рабочий стол
		if (\lib_office::hasPermission($this->user(), \lib_office::PERMISSION_ANY)) {
			header("Location: " . \lib_office::OFFICE_ROOT() . "/desktop");
		} else {
			$this->renderer()->assign("schemasList", \lib_office::getSchemasList());
			$this->renderDefault();
		}
	}

}
?>
