/** * Save User group rights * @param sfWebRequest $request * @return unknown_type */ public function executeSaveUserGroupRight(sfWebRequest $request) { $userService = new UserService(); $userGroup = $userService->readUserGroup($request->getParameter('id')); $moduleRights = new ModuleRights(); $moduleRights->setUsergId($request->getParameter('id')); $moduleRights->setModId($request->getParameter('cmbModuleID')); $moduleRights->setAddition($request->getParameter('chkAdd')); $moduleRights->setEditing($request->getParameter('chkEdit')); $moduleRights->setDeletion($request->getParameter('chkDelete')); $moduleRights->setViewing($request->getParameter('chkView')); $userService->saveUserGroupModelRights($moduleRights); $this->redirect('admin/listUserGroupRight?id=' . $userGroup->getUsergId()); }
/** * Save Grop module rights * @return Skill */ public function saveUserGroupModelRights(ModuleRights $moduleRights) { try { $moduleRights->save(); } catch (Exception $e) { throw new AdminServiceException($e->getMessage()); } }
/** * Saves ModuleRights * @param ModuleRights $moduleRights * @returns boolean * @throws DaoException */ public function saveUserGroupModelRights(ModuleRights $moduleRights) { try { $moduleRights->save(); return true; } catch (Exception $e) { throw new DaoException($e->getMessage()); } }