mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-22 07:04:24 +00:00
refactor:从服务端限制WEB终端仅限超管执行命令
This commit is contained in:
parent
479df6b864
commit
02321bf726
@ -187,8 +187,8 @@ class Terminal
|
||||
$token = request()->server('HTTP_BATOKEN', request()->request('batoken', Cookie::get('batoken') ?: false));
|
||||
$auth = Auth::instance();
|
||||
$auth->init($token);
|
||||
if (!$auth->isLogin()) {
|
||||
$this->execError('Please login first', true);
|
||||
if (!$auth->isSuperAdmin()) {
|
||||
$this->execError("You're not super administrator", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user