fix: case sensitive typo

This commit is contained in:
Karol Sójko
2023-12-22 12:14:53 +01:00
parent 615e4184f6
commit b1cb6a1d21
3 changed files with 7 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ export abstract class AuthMiddleware extends BaseMiddleware {
response.locals.roles = decodedToken.roles
response.locals.sharedVaultOwnerContext = decodedToken.shared_vault_owner_context
response.locals.readOnlyAccess = decodedToken.session?.readonly_access ?? false
if (response.locals.readonlyAccess) {
if (response.locals.readOnlyAccess) {
this.logger.info('User operates on read-only access', {
codeTag: 'AuthMiddleware',
userId: response.locals.user.uuid,

View File

@@ -27,8 +27,8 @@ export class GRPCSyncingServerServiceProxy {
const metadata = new Metadata()
metadata.set('x-user-uuid', response.locals.user.uuid)
metadata.set('x-snjs-version', request.headers['x-snjs-version'] as string)
metadata.set('x-read-only-access', response.locals.readonlyAccess ? 'true' : 'false')
if (response.locals.readonlyAccess) {
metadata.set('x-read-only-access', response.locals.readOnlyAccess ? 'true' : 'false')
if (response.locals.readOnlyAccess) {
this.logger.info('Syncing with read-only access', {
codeTag: 'GRPCSyncingServerServiceProxy',
userId: response.locals.user.uuid,

View File

@@ -36,6 +36,10 @@ export class AuthenticationMethodResolver implements AuthenticationMethodResolve
}
const userUuid = userUuidOrError.getValue()
this.logger.info('User utilizing JWT authentication method.', {
userId: userUuid.value,
})
return {
type: 'jwt',
user: await this.userRepository.findOneByUuid(userUuid),