0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-27 22:59:51 -05:00

fix: fixed an issue where logger.info in allow_action always output undefined (#3763)

logger.info({ user: user.name }, `auth/allow_action: access granted to: @{user}`);

The above log code will always output undefined
This commit is contained in:
cmkk 2023-04-24 12:54:52 +08:00 committed by GitHub
parent 12d954ae2c
commit 268c5e7740
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,7 @@ export function allow_action(action: string): Function {
debug('[auth/allow_action]: hasPermission? %o} for user: %o', hasPermission, user?.name);
if (hasPermission) {
logger.info({ remote: user.name }, `auth/allow_action: access granted to: @{user}`);
logger.info({ user: user.name }, `auth/allow_action: access granted to: @{user}`);
return callback(null, true);
}