## 进行权限过滤
>Rbac::AccessDecision()
~~~php
public function _initialize(){
if(!isset($_SESSION[C('USER_AUTH_KEY')])) {
$this->redirect('login/index');
}
//拿出权限菜单
$menu = new MenuModel();
$menuList = $menu->getMenu();
//设置活跃菜单
$menu->menuActive($menuList,CONTROLLER_NAME .'/'. ACTION_NAME);
$this->assign('menuBar',$menu->buildMenu($menuList));
if(!Rbac::AccessDecision()){
$this->error('您没有权限');
}
}
~~~