diff --git a/database/src/factories/user.factory.ts b/database/src/factories/user.factory.ts index 966e5ffc8..9950ef689 100644 --- a/database/src/factories/user.factory.ts +++ b/database/src/factories/user.factory.ts @@ -12,17 +12,13 @@ define(User, (faker: typeof Faker, context?: UserContext) => { user.email = context.email ? context.email : faker.internet.email() user.firstName = context.firstName ? context.firstName : faker.name.firstName() user.lastName = context.lastName ? context.lastName : faker.name.lastName() - user.username = context.username ? context.username : faker.internet.userName() user.disabled = context.disabled ? context.disabled : false - user.indexId = 0 - user.description = context.description ? context.description : faker.random.words(4) // TODO Create real password and keys/hash user.password = context.password ? context.password : BigInt(0) user.privKey = context.privKey ? context.privKey : randomBytes(80) user.emailHash = context.emailHash ? context.emailHash : randomBytes(32) user.createdAt = context.createdAt ? context.createdAt : faker.date.recent() user.emailChecked = context.emailChecked === undefined ? false : context.emailChecked - user.passphraseShown = context.passphraseShown ? context.passphraseShown : false user.language = context.language ? context.language : 'en' user.publisherId = context.publisherId ? context.publisherId : 0 user.passphrase = context.passphrase ? context.passphrase : faker.random.words(24) diff --git a/database/src/interface/UserContext.ts b/database/src/interface/UserContext.ts index 0fa1a61b5..7ed794793 100644 --- a/database/src/interface/UserContext.ts +++ b/database/src/interface/UserContext.ts @@ -3,15 +3,12 @@ export interface UserContext { email?: string firstName?: string lastName?: string - username?: string disabled?: boolean - description?: string password?: BigInt privKey?: Buffer emailHash?: Buffer createdAt?: Date emailChecked?: boolean - passphraseShown?: boolean language?: string publisherId?: number passphrase?: string diff --git a/database/src/interface/UserInterface.ts b/database/src/interface/UserInterface.ts index 2e20b857f..7e1e2fe48 100644 --- a/database/src/interface/UserInterface.ts +++ b/database/src/interface/UserInterface.ts @@ -3,15 +3,12 @@ export interface UserInterface { email?: string firstName?: string lastName?: string - username?: string - description?: string password?: BigInt pubKey?: Buffer privKey?: Buffer emailHash?: Buffer createdAt?: Date emailChecked?: boolean - passphraseShown?: boolean language?: string disabled?: boolean groupId?: number diff --git a/database/src/seeds/helpers/user-helpers.ts b/database/src/seeds/helpers/user-helpers.ts index 55ab40e9d..c40ff1527 100644 --- a/database/src/seeds/helpers/user-helpers.ts +++ b/database/src/seeds/helpers/user-helpers.ts @@ -42,15 +42,12 @@ const createUserContext = (context: UserInterface): UserContext => { email: context.email, firstName: context.firstName, lastName: context.lastName, - username: context.username, disabled: context.disabled, - description: context.description, password: context.password, privKey: context.privKey, emailHash: context.emailHash, createdAt: context.createdAt, emailChecked: context.emailChecked, - passphraseShown: context.passphraseShown, language: context.language, publisherId: context.publisherId, } @@ -59,7 +56,6 @@ const createUserContext = (context: UserInterface): UserContext => { const createServerUserContext = (context: UserInterface): ServerUserContext => { return { role: context.role, - username: context.username, password: context.serverUserPassword, email: context.email, activated: context.activated, diff --git a/database/src/seeds/users/bibi-bloxberg.ts b/database/src/seeds/users/bibi-bloxberg.ts index 221349cb7..e8291b213 100644 --- a/database/src/seeds/users/bibi-bloxberg.ts +++ b/database/src/seeds/users/bibi-bloxberg.ts @@ -3,7 +3,7 @@ export const bibiBloxberg = { firstName: 'Bibi', lastName: 'Bloxberg', username: 'bibi', - description: 'Hex Hex', + // description: 'Hex Hex', password: BigInt('12825419584724616625'), pubKey: Buffer.from('42de7e4754625b730018c3b4ea745a4d043d9d867af352d0f08871793dfa6743', 'hex'), privKey: Buffer.from( @@ -13,7 +13,6 @@ export const bibiBloxberg = { emailHash: Buffer.from('38a0d8c8658a5681cc1180c5d9e2b2a18e4f611db8ab3ca61de4aa91ae94219b', 'hex'), createdAt: new Date('2021-11-26T11:32:16'), emailChecked: true, - passphraseShown: false, language: 'de', disabled: false, groupId: 1, diff --git a/database/src/seeds/users/bob-baumeister.ts b/database/src/seeds/users/bob-baumeister.ts index 013636079..1c9f992e6 100644 --- a/database/src/seeds/users/bob-baumeister.ts +++ b/database/src/seeds/users/bob-baumeister.ts @@ -3,7 +3,7 @@ export const bobBaumeister = { firstName: 'Bob', lastName: 'der Baumeister', username: 'bob', - description: 'Können wir das schaffen? Ja, wir schaffen das!', + // description: 'Können wir das schaffen? Ja, wir schaffen das!', password: BigInt('3296644341468822636'), pubKey: Buffer.from('a509d9a146374fc975e3677db801ae8a4a83bff9dea96da64053ff6de6b2dd7e', 'hex'), privKey: Buffer.from( @@ -13,7 +13,6 @@ export const bobBaumeister = { emailHash: Buffer.from('4b8ce4e175587aaf33da19e272719da1a547daff557820191fab0c65c5a3b7f1', 'hex'), createdAt: new Date('2021-11-26T11:36:31'), emailChecked: true, - passphraseShown: false, language: 'de', disabled: false, groupId: 1, diff --git a/database/src/seeds/users/garrick-ollivander.ts b/database/src/seeds/users/garrick-ollivander.ts index 1c7bbb9fc..bddd5aa0f 100644 --- a/database/src/seeds/users/garrick-ollivander.ts +++ b/database/src/seeds/users/garrick-ollivander.ts @@ -3,13 +3,12 @@ export const garrickOllivander = { firstName: 'Garrick', lastName: 'Ollivander', username: 'garrick', - description: `Curious ... curious ... -Renowned wandmaker Mr Ollivander owns the wand shop Ollivanders: Makers of Fine Wands Since 382 BC in Diagon Alley. His shop is widely considered the best place to purchase a wand.`, + // description: `Curious ... curious ... + // Renowned wandmaker Mr Ollivander owns the wand shop Ollivanders: Makers of Fine Wands Since 382 BC in Diagon Alley. His shop is widely considered the best place to purchase a wand.`, password: BigInt('0'), emailHash: Buffer.from('91e358000e908146342789979d62a7255b2b88a71dad0c6a10e32af44be57886', 'hex'), createdAt: new Date('2022-01-10T10:23:17'), emailChecked: false, - passphraseShown: false, language: 'en', disabled: false, groupId: 1, diff --git a/database/src/seeds/users/peter-lustig.ts b/database/src/seeds/users/peter-lustig.ts index c96b28a65..da6c31777 100644 --- a/database/src/seeds/users/peter-lustig.ts +++ b/database/src/seeds/users/peter-lustig.ts @@ -3,7 +3,7 @@ export const peterLustig = { firstName: 'Peter', lastName: 'Lustig', username: 'peter', - description: 'Latzhose und Nickelbrille', + // description: 'Latzhose und Nickelbrille', password: BigInt('3917921995996627700'), pubKey: Buffer.from('7281e0ee3258b08801f3ec73e431b4519677f65c03b0382c63a913b5784ee770', 'hex'), privKey: Buffer.from( @@ -13,7 +13,6 @@ export const peterLustig = { emailHash: Buffer.from('9f700e6f6ec351a140b674c0edd4479509697b023bd8bee8826915ef6c2af036', 'hex'), createdAt: new Date('2020-11-25T10:48:43'), emailChecked: true, - passphraseShown: false, language: 'de', disabled: false, groupId: 1, diff --git a/database/src/seeds/users/raeuber-hotzenplotz.ts b/database/src/seeds/users/raeuber-hotzenplotz.ts index c1f31b490..aaf862d14 100644 --- a/database/src/seeds/users/raeuber-hotzenplotz.ts +++ b/database/src/seeds/users/raeuber-hotzenplotz.ts @@ -3,7 +3,7 @@ export const raeuberHotzenplotz = { firstName: 'Räuber', lastName: 'Hotzenplotz', username: 'räuber', - description: 'Pfefferpistole', + // description: 'Pfefferpistole', password: BigInt('12123692783243004812'), pubKey: Buffer.from('d7c70f94234dff071d982aa8f41583876c356599773b5911b39080da2b8c2d2b', 'hex'), privKey: Buffer.from( @@ -13,7 +13,6 @@ export const raeuberHotzenplotz = { emailHash: Buffer.from('ec8d34112adb40ff2f6538b05660b03440372690f034cd7d6322d17020233c77', 'hex'), createdAt: new Date('2021-11-26T11:32:16'), emailChecked: true, - passphraseShown: false, language: 'de', disabled: false, groupId: 1,