mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +00:00
SYNC: logi checker refactor
This commit is contained in:
committed by
Diflow
parent
eb24dd5d9e
commit
d07bf270e7
@@ -21,6 +21,7 @@ const {
|
||||
} = require('../utility/cloudIntf');
|
||||
const socket = require('../utility/socket');
|
||||
const { sendToAuditLog } = require('../utility/auditlog');
|
||||
const { isLoginLicensed, LOGIN_LIMIT_ERROR } = require('../utility/loginchecker');
|
||||
|
||||
const logger = getLogger('auth');
|
||||
|
||||
@@ -110,6 +111,10 @@ module.exports = {
|
||||
adminPassword = decryptPasswordString(adminConfig?.adminPassword);
|
||||
}
|
||||
if (adminPassword && adminPassword == password) {
|
||||
if (!(await isLoginLicensed(req, `superadmin`))) {
|
||||
return { error: LOGIN_LIMIT_ERROR };
|
||||
}
|
||||
|
||||
sendToAuditLog(req, {
|
||||
category: 'auth',
|
||||
component: 'AuthController',
|
||||
|
||||
Reference in New Issue
Block a user