diff --git a/Application/Admin/Conf/config.php b/Application/Admin/Conf/config.php index ff9f5af47..4a5cdab53 100644 --- a/Application/Admin/Conf/config.php +++ b/Application/Admin/Conf/config.php @@ -116,6 +116,7 @@ return array( 'OFFICIEL_CHANNEL'=>"江息网络", /*分库的表格*/ 'SUBSITE_TABLE'=>[ - "tab_spend" + "tab_spend", + "sys_auth_group" ] ); \ No newline at end of file diff --git a/Application/Admin/Controller/AuthManagerController.class.php b/Application/Admin/Controller/AuthManagerController.class.php index e9577cb24..266684cde 100644 --- a/Application/Admin/Controller/AuthManagerController.class.php +++ b/Application/Admin/Controller/AuthManagerController.class.php @@ -147,7 +147,7 @@ class AuthManagerController extends AdminController{ */ public function access(){ $this->updateRules(); - $auth_group = M('AuthGroup')->where( array('status'=>array('egt','0'),'module'=>'admin','type'=>AuthGroupModel::TYPE_ADMIN) ) + $auth_group = SM('auth_group',"sys_")->where( array('status'=>array('egt','0'),'module'=>'admin','type'=>AuthGroupModel::TYPE_ADMIN) ) ->getfield('id,id,title,rules'); $node_list = $this->returnNodes(); $map = array('module'=>'admin','type'=>AuthRuleModel::RULE_MAIN,'status'=>1); @@ -220,7 +220,7 @@ class AuthManagerController extends AdminController{ if ( $data ) { if ( empty($data['id']) ) { \Think\Log::actionLog('AuthManager/createGroup','authGroup',1); - $r = $AuthGroup->add(); + $r = SM("auth_group","sys_")->add($data); addOperationLog(array( "op_type"=>0, "key"=> $_POST['title'], @@ -228,7 +228,8 @@ class AuthManagerController extends AdminController{ )); }else{ \Think\Log::actionLog('AuthManager/editGroup','authGroup',1); - $r = $AuthGroup->save(); + $r = SM("auth_group","sys_")->save($data); + // dd($r); //操作日志,不传title表示是访问授权 $oparr = array( "op_type"=>1, diff --git a/Application/Admin/View/AuthManager/index.html b/Application/Admin/View/AuthManager/index.html index 1a543c92c..f0b3e7c02 100644 --- a/Application/Admin/View/AuthManager/index.html +++ b/Application/Admin/View/AuthManager/index.html @@ -5,15 +5,16 @@
说明:可以设置管理账号的不同操作权限
- -