mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fix
This commit is contained in:
parent
6ddb8b8bf9
commit
3dc63507ad
@ -28,7 +28,12 @@ module.exports = {
|
||||
get_meta: true,
|
||||
async get(_params, req) {
|
||||
const logins = getLogins();
|
||||
const login = req.user ? req.user.login : logins ? logins.find(x => x.login == (req.auth && req.auth.user)) : null;
|
||||
const login =
|
||||
req && req.user
|
||||
? req.user.login
|
||||
: logins
|
||||
? logins.find(x => x.login == (req && req.auth && req.auth.user))
|
||||
: null;
|
||||
const permissions = login ? login.permissions : process.env.PERMISSIONS;
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user