mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 02:36:00 +00:00
Create login entries when the OAUTH_PERMISSIONS flag is truthy
This commit is contained in:
@@ -39,7 +39,7 @@ function getLogins() {
|
||||
permissions: process.env.PERMISSIONS,
|
||||
});
|
||||
}
|
||||
if (process.env.LOGINS) {
|
||||
if (process.env.LOGINS || process.env.OAUTH_PERMISSIONS) {
|
||||
const logins = _.compact(process.env.LOGINS.split(',').map(x => x.trim()));
|
||||
for (const login of logins) {
|
||||
const password = process.env[`LOGIN_PASSWORD_${login}`];
|
||||
@@ -51,6 +51,13 @@ function getLogins() {
|
||||
permissions,
|
||||
});
|
||||
}
|
||||
if (process.env.OAUTH_PERMISSIONS) {
|
||||
res.push({
|
||||
login,
|
||||
password: null,
|
||||
permissions,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user