权限管理 添加分组 新建用户授权 仍然无法看见 拥有此权限菜单项目
临时修改了代码。解决了授权后无法登陆。
AdminController.class.php 286行
// 判断主菜单权限
if ( !IS_ROOT && !$this->checkRule($item['url'],AuthRuleModel::RULE_MAIN,null) ) {
unset($menus['main'][$key]);
continue;//继续循环
}修改为:// 判断主菜单权限
if ( !IS_ROOT && !$this->checkRule($item['url'],AuthRuleModel::RULE_URL,null) ) {
unset($menus['main'][$key]);
continue;//继续循环
}添加权限 AuthManagerController.class.php 也有bug。修改181行为: public function writeGroup(){
if(isset($_POST['rules'])){
sort($_POST['rules']);
$_POST['rules'] = trim( implode( ',' , array_unique($_POST['rules'])) , ',' );
$_POST['rules'] = '6,'.$_POST['rules'];
}
if(empty($_POST['rules'])){
$_POST['rules'] = '6';
}问题解决。但是不知道修改后对权限有没有影响。目前还在测试,有兴趣的朋友可以改来看看。
2.jpg
( 78.31 KB 下载:2 次 )
最佳答案