mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修改节点过虑
This commit is contained in:
parent
76a0653e7a
commit
511cd20a4f
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
namespace app\admin\model;
|
namespace app\admin\model;
|
||||||
|
|
||||||
use think\Config;
|
|
||||||
use think\Db;
|
use think\Db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -33,10 +32,7 @@ class NodeModel {
|
|||||||
public static function applyAuthNode() {
|
public static function applyAuthNode() {
|
||||||
cache('need_access_node', null);
|
cache('need_access_node', null);
|
||||||
if (($authorize = session('user.authorize'))) {
|
if (($authorize = session('user.authorize'))) {
|
||||||
$authorizeids = Db::name('SystemAuth')
|
$authorizeids = Db::name('SystemAuth')->where('id', 'in', explode(',', $authorize))->where('status', '1')->column('id');
|
||||||
->where('id', 'in', explode(',', $authorize))
|
|
||||||
->where('status', '1')
|
|
||||||
->column('id');
|
|
||||||
if (empty($authorizeids)) {
|
if (empty($authorizeids)) {
|
||||||
return session('user.nodes', []);
|
return session('user.nodes', []);
|
||||||
}
|
}
|
||||||
@ -76,7 +72,7 @@ class NodeModel {
|
|||||||
if (!in_array($auth_node, self::getAuthNode())) {
|
if (!in_array($auth_node, self::getAuthNode())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return in_array($auth_node, (array)session('user.nodes'));
|
return in_array($auth_node, (array) session('user.nodes'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,7 +87,7 @@ class NodeModel {
|
|||||||
$nodes = [];
|
$nodes = [];
|
||||||
$ignore = [
|
$ignore = [
|
||||||
'index',
|
'index',
|
||||||
'wechat/api', 'wechat/notify',
|
'wechat/api', 'wechat/notify', 'wechat/review',
|
||||||
'admin/plugs', 'admin/login', 'admin/index',
|
'admin/plugs', 'admin/login', 'admin/index',
|
||||||
];
|
];
|
||||||
foreach (self::getNodeTree(APP_PATH) as $thr) {
|
foreach (self::getNodeTree(APP_PATH) as $thr) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user