Пример #1
0
 /**
  * 编辑角色
  */
 public function action_edit()
 {
     if (!Auth::getInstance()->isAllow('role.edit')) {
         $this->show_message("对不起,您没有权限执行该操作");
     }
     if ($this->isPost()) {
         try {
             $this->role->editRole($this->getPost());
             $this->request->redirect('/admin/role/list?mod_name=' . trim($this->getQuery('mod_name')));
         } catch (Exception $e) {
             $this->show_message('操作失败:' . $e->getMessage());
         }
     }
     $this->auto_render = false;
 }