public function frmAction($id = NULL) { $role = $this->getInstance($id); $controllers = array("Default" => array("name" => "Tous", "actions" => array("index" => "Lister", "frm" => "Modifiation des données Brutes", "update" => "Modifier/Ajouter", "delete" => "Supprimer", "show" => "Afficher les détails")), "Projects" => array("name" => "Projets", "actions" => array("manage" => "Ajouter/Modifier UseCases", "manageUc" => "Ajouter/Modifier Tâches")), "Roles" => array("name" => "Rôles", "actions" => array("updateACL" => "Mettre à jour es droits")), "Taches" => array("name" => "Tâches", "actions" => array()), "Messages" => array("name" => "Messages", "actions" => array()), "UseCases" => array("name" => "Use Cases", "actions" => array()), "Users" => array("name" => "Utilisateurs", "actions" => array())); $acls = Acl::find("idRole=" . $role->getId()); $this->view->setVars(array("role" => $role, "acls" => AclController::toArray($acls), "controllers" => $controllers, "siteUrl" => $this->url->getBaseUri(), "baseHref" => $this->dispatcher->getControllerName())); $_SESSION['bread']['object'] = $role; $this->jquery->postFormOnClick(".validateACL", $this->dispatcher->getControllerName() . "/updateACL", "frmObject", "#content"); parent::frmAction($id); }
public function fastConnectAction($role) { $user = User::findFirst("idRole = " . $role); if ($user != null) { $this->session->set("user", $user); $acl = Acl::find("idRole = " . $user->getIdRole()); $this->session->set("rights", AclController::toArray($acl)); $msg = new DisplayedMessage("Bienvenue " . $user); $this->dispatcher->forward(array("controller" => "Index", "action" => "indexAjax", "params" => array($msg))); } else { $this->dispatcher->forward(array("controller" => "Auth", "action" => "signin", "params" => array(true))); } }