优化渠道登录
This commit is contained in:
@@ -26,6 +26,12 @@ class Channel extends Backend
|
||||
|
||||
protected string|array $quickSearchField = ['id', 'code', 'name'];
|
||||
|
||||
/**
|
||||
* adminTree 为辅助接口,默认权限节点名 game/channel/admintree 往往未在后台录入;
|
||||
* 与列表权限 game/channel/index 对齐,避免子管理员已勾「渠道管理」仍 401。
|
||||
*/
|
||||
protected array $noNeedPermission = ['adminTree'];
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
$this->model = new \app\common\model\GameChannel();
|
||||
@@ -40,6 +46,10 @@ class Channel extends Backend
|
||||
$response = $this->initializeBackend($request);
|
||||
if ($response !== null) return $response;
|
||||
|
||||
if (!$this->auth->check('game/channel/index')) {
|
||||
return $this->error(__('You have no permission'));
|
||||
}
|
||||
|
||||
$channels = Db::name('game_channel')
|
||||
->field(['id', 'name', 'admin_group_id'])
|
||||
->order('id', 'asc')
|
||||
|
||||
Reference in New Issue
Block a user