优化权限

master
chenzhi 4 years ago
parent c422b84df4
commit 511f53e83c

@ -975,8 +975,9 @@ function getModuleControllerAuth()
$group = $_SESSION['onethink_admin']['user_group_id']; $group = $_SESSION['onethink_admin']['user_group_id'];
//获取全部权限列表 //获取全部权限列表
$ruleList = M("AuthGroup")->field("rules")->where("id='{$group}'")->find()['rules']; $ruleList = M("AuthGroup")->field("rules")->where("id='{$group}'")->find()['rules'];
//获取所有含有规则的数据 //获取所有含有规则的数据
$mc = "MODULE_NAME."/".CONTROLLER_NAME"; $mc = MODULE_NAME."/".CONTROLLER_NAME;
$authlist = M("AuthRule")->field('name')->where("name like '{$mc}%' AND id in ($ruleList)")->select(); $authlist = M("AuthRule")->field('name')->where("name like '{$mc}%' AND id in ($ruleList)")->select();
$Auth = []; $Auth = [];
foreach ($authlist as $k => $v) { foreach ($authlist as $k => $v) {

@ -112,7 +112,7 @@ class CompanyStatementController extends ThinkController
if(isset($_REQUEST['verify_status'])){ if(isset($_REQUEST['verify_status'])){
$map['verify_status'] = $_REQUEST['verify_status']; $map['verify_status'] = $_REQUEST['verify_status'];
} }
$this->checkListOrCountAuthRestMap($map);//导出权限 // $this->checkListOrCountAuthRestMap($map);//导出权限
//条件end //条件end
$data = M("company_statement","tab_") $data = M("company_statement","tab_")
->field("id,withdraw_type,company_name,company_belong,statement_begin_time,statement_end_time,statement_money,platform_amount,verify_status,verify_log,op_time,remark") ->field("id,withdraw_type,company_name,company_belong,statement_begin_time,statement_end_time,statement_money,platform_amount,verify_status,verify_log,op_time,remark")

@ -62,7 +62,7 @@ class CompanyStatementLackController extends ThinkController
$map['is_payment'] = $_REQUEST['is_payment']; $map['is_payment'] = $_REQUEST['is_payment'];
} }
$this->checkListOrCountAuthRestMap($map);//导出权限 // $this->checkListOrCountAuthRestMap($map);//导出权限
//条件end //条件end
$data = $this->DBModel $data = $this->DBModel

@ -96,7 +96,7 @@ class CompanyStatementPoolController extends ThinkController
} }
$this->checkListOrCountAuthRestMap($map);//导出权限 // $this->checkListOrCountAuthRestMap($map);//导出权限
//条件end //条件end
$data = $this->DBModel $data = $this->DBModel
->field("*") ->field("*")

@ -976,7 +976,7 @@ function getModuleControllerAuth()
//获取全部权限列表 //获取全部权限列表
$ruleList = M("AuthGroup")->field("rules")->where("id='{$group}'")->find()['rules']; $ruleList = M("AuthGroup")->field("rules")->where("id='{$group}'")->find()['rules'];
//获取所有含有规则的数据 //获取所有含有规则的数据
$mc = "MODULE_NAME."/".CONTROLLER_NAME"; $mc = MODULE_NAME."/".CONTROLLER_NAME;
$authlist = M("AuthRule")->field('name')->where("name like '{$mc}%' AND id in ($ruleList)")->select(); $authlist = M("AuthRule")->field('name')->where("name like '{$mc}%' AND id in ($ruleList)")->select();
$Auth = []; $Auth = [];
foreach ($authlist as $k => $v) { foreach ($authlist as $k => $v) {

Loading…
Cancel
Save