mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
修改超级账号配置
This commit is contained in:
parent
d53fed33e1
commit
bc5ca1126d
@ -17,6 +17,7 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\admin\Controller;
|
||||
use think\admin\service\AdminService;
|
||||
|
||||
/**
|
||||
* 系统用户管理
|
||||
@ -44,7 +45,7 @@ class User extends Controller
|
||||
protected function initialize()
|
||||
{
|
||||
// 超级用户名称
|
||||
$this->superName = $this->app->config->get('app.super_user', 'admin');
|
||||
$this->superName = AdminService::instance()->getSuperName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
6
vendor/composer/InstalledVersions.php
vendored
6
vendor/composer/InstalledVersions.php
vendored
@ -32,7 +32,7 @@ private static $installed = array (
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '3cc374d1349454a0a8410869d7a9452461017e24',
|
||||
'reference' => 'd53fed33e1f513f043cccc0fbb69b48c0d9fbe41',
|
||||
'name' => 'zoujingli/thinkadmin',
|
||||
),
|
||||
'versions' =>
|
||||
@ -171,7 +171,7 @@ private static $installed = array (
|
||||
array (
|
||||
0 => '9999999-dev',
|
||||
),
|
||||
'reference' => 'cdf95212d42ba02af227e02395259dc4bee9e610',
|
||||
'reference' => 'dab37cf567def670988c452943022ff1b8bb4176',
|
||||
),
|
||||
'zoujingli/thinkadmin' =>
|
||||
array (
|
||||
@ -180,7 +180,7 @@ private static $installed = array (
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '3cc374d1349454a0a8410869d7a9452461017e24',
|
||||
'reference' => 'd53fed33e1f513f043cccc0fbb69b48c0d9fbe41',
|
||||
),
|
||||
'zoujingli/wechat-developer' =>
|
||||
array (
|
||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -849,12 +849,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||
"reference": "cdf95212d42ba02af227e02395259dc4bee9e610"
|
||||
"reference": "dab37cf567def670988c452943022ff1b8bb4176"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/cdf95212d42ba02af227e02395259dc4bee9e610",
|
||||
"reference": "cdf95212d42ba02af227e02395259dc4bee9e610",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/dab37cf567def670988c452943022ff1b8bb4176",
|
||||
"reference": "dab37cf567def670988c452943022ff1b8bb4176",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -871,7 +871,7 @@
|
||||
"ext-mbstring": "*",
|
||||
"topthink/framework": "^6.0"
|
||||
},
|
||||
"time": "2021-05-27T01:59:28+00:00",
|
||||
"time": "2021-05-27T02:17:00+00:00",
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
6
vendor/composer/installed.php
vendored
6
vendor/composer/installed.php
vendored
@ -6,7 +6,7 @@
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '3cc374d1349454a0a8410869d7a9452461017e24',
|
||||
'reference' => 'd53fed33e1f513f043cccc0fbb69b48c0d9fbe41',
|
||||
'name' => 'zoujingli/thinkadmin',
|
||||
),
|
||||
'versions' =>
|
||||
@ -145,7 +145,7 @@
|
||||
array (
|
||||
0 => '9999999-dev',
|
||||
),
|
||||
'reference' => 'cdf95212d42ba02af227e02395259dc4bee9e610',
|
||||
'reference' => 'dab37cf567def670988c452943022ff1b8bb4176',
|
||||
),
|
||||
'zoujingli/thinkadmin' =>
|
||||
array (
|
||||
@ -154,7 +154,7 @@
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '3cc374d1349454a0a8410869d7a9452461017e24',
|
||||
'reference' => 'd53fed33e1f513f043cccc0fbb69b48c0d9fbe41',
|
||||
),
|
||||
'zoujingli/wechat-developer' =>
|
||||
array (
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2021-05-27 10:10:34
|
||||
// This file is automatically generated at:2021-05-27 10:19:04
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\admin\\Library',
|
||||
|
@ -47,7 +47,16 @@ class AdminService extends Service
|
||||
*/
|
||||
public function isSuper(): bool
|
||||
{
|
||||
return $this->getUserName() === $this->app->config->get('app.super_user', 'admin');
|
||||
return $this->getUserName() === $this->getSuperName();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取超级用户账号
|
||||
* @return string
|
||||
*/
|
||||
public function getSuperName(): string
|
||||
{
|
||||
return $this->app->config->get('app.super_user', 'admin');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user