public function roleAction()
 {
     $this->userService->checkRightGate('USER_ADMIN');
     $form = $this->getForm('roleEditForm', dirname(__FILE__) . '/roleAdminForm.xml');
     $form->addDataProvider('listRightsByModule', $this->userService->listRightsByModule());
     if ($form->isSubmit()) {
         if ($form->isValid()) {
             $role = $form->getContainer('role');
             $this->userService->saveRole($role);
             $this->forward('user', 'admin', 'listRoles');
             return;
         }
     } else {
         $id = $this->getParam('id', 0);
         if ($id == '') {
             throw new \org\equinox\exception\ParameterInvalidException("No (id) provided then editing a role !!!");
         }
         $role = $this->userService->getRole($id);
         if ($role == null) {
             throw new \org\equinox\exception\ParameterInvalidException("No role found for id ({$id})");
         }
         $form->setContainer('role', $role);
     }
     $this->storeForm($form);
     $this->assign('form', $form);
     $this->assign('role', $role);
 }