在环境文件中增加谷歌验证器开关
This commit is contained in:
@@ -231,6 +231,10 @@ class Admin extends Backend
|
||||
$response = $this->initializeBackend($request);
|
||||
if ($response !== null) return $response;
|
||||
|
||||
if (!\app\common\library\AdminTotp::isEnabled()) {
|
||||
return $this->error(__('Google Authenticator is disabled'));
|
||||
}
|
||||
|
||||
if ($request->method() !== 'POST') {
|
||||
return $this->error(__('Method not allowed'), [], 0, ['statusCode' => 405]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user