mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 18:25:21 -04:00
feat(backend): handle username always in lowercase
This should make all usernames of new users into lowercase. Usernames are also searched in the DB as lowercase. Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
9625900d1c
commit
0a8945d934
23 changed files with 99 additions and 58 deletions
|
@ -41,6 +41,7 @@ import { Session } from '../../users/session.entity';
|
|||
import { User } from '../../users/user.entity';
|
||||
import { UsersModule } from '../../users/users.module';
|
||||
import { UsersService } from '../../users/users.service';
|
||||
import { Username } from '../../utils/username';
|
||||
import * as websocketConnectionModule from '../realtime-note/realtime-connection';
|
||||
import { RealtimeConnection } from '../realtime-note/realtime-connection';
|
||||
import { RealtimeNote } from '../realtime-note/realtime-note';
|
||||
|
@ -165,7 +166,7 @@ describe('Websocket gateway', () => {
|
|||
),
|
||||
);
|
||||
|
||||
const mockUsername = 'mockUsername';
|
||||
const mockUsername: Username = 'mock-username';
|
||||
jest
|
||||
.spyOn(sessionService, 'fetchUsernameForSessionId')
|
||||
.mockImplementation((sessionId: string) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue