mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 19:12:48 +08:00
feat: 控制器中将authService作为内部属性以便子类控制器访问
This commit is contained in:
@@ -108,6 +108,13 @@ class AdminControllerBase extends BaseController
|
|||||||
*/
|
*/
|
||||||
protected $sessionAdmin;
|
protected $sessionAdmin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权限服务
|
||||||
|
*
|
||||||
|
* @var AuthService
|
||||||
|
*/
|
||||||
|
protected $authService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化方法.
|
* 初始化方法.
|
||||||
*/
|
*/
|
||||||
@@ -481,6 +488,7 @@ class AdminControllerBase extends BaseController
|
|||||||
|
|
||||||
/** @var AuthService $authService */
|
/** @var AuthService $authService */
|
||||||
$authService = app(AuthService::class, ['adminId' => $adminId]);
|
$authService = app(AuthService::class, ['adminId' => $adminId]);
|
||||||
|
$this->authService = $authService;
|
||||||
|
|
||||||
$currentNode = $authService->getCurrentNode();
|
$currentNode = $authService->getCurrentNode();
|
||||||
if (is_null($currentNode)) {
|
if (is_null($currentNode)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user