aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/user/user.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/user/user.ts')
-rw-r--r--server/models/user/user.ts19
1 files changed, 14 insertions, 5 deletions
diff --git a/server/models/user/user.ts b/server/models/user/user.ts
index 069d7266e..ddce455a1 100644
--- a/server/models/user/user.ts
+++ b/server/models/user/user.ts
@@ -39,8 +39,6 @@ import { UserAdminFlag } from '../../../shared/models/users/user-flag.model'
39import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' 39import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type'
40import { isThemeNameValid } from '../../helpers/custom-validators/plugins' 40import { isThemeNameValid } from '../../helpers/custom-validators/plugins'
41import { 41import {
42 isNoInstanceConfigWarningModal,
43 isNoWelcomeModal,
44 isUserAdminFlagsValid, 42 isUserAdminFlagsValid,
45 isUserAutoPlayNextVideoPlaylistValid, 43 isUserAutoPlayNextVideoPlaylistValid,
46 isUserAutoPlayNextVideoValid, 44 isUserAutoPlayNextVideoValid,
@@ -48,6 +46,7 @@ import {
48 isUserBlockedReasonValid, 46 isUserBlockedReasonValid,
49 isUserBlockedValid, 47 isUserBlockedValid,
50 isUserEmailVerifiedValid, 48 isUserEmailVerifiedValid,
49 isUserNoModal,
51 isUserNSFWPolicyValid, 50 isUserNSFWPolicyValid,
52 isUserPasswordValid, 51 isUserPasswordValid,
53 isUserRoleValid, 52 isUserRoleValid,
@@ -349,7 +348,7 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
349 @Default(false) 348 @Default(false)
350 @Is( 349 @Is(
351 'UserNoInstanceConfigWarningModal', 350 'UserNoInstanceConfigWarningModal',
352 value => throwIfNotValid(value, isNoInstanceConfigWarningModal, 'no instance config warning modal') 351 value => throwIfNotValid(value, isUserNoModal, 'no instance config warning modal')
353 ) 352 )
354 @Column 353 @Column
355 noInstanceConfigWarningModal: boolean 354 noInstanceConfigWarningModal: boolean
@@ -357,12 +356,21 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
357 @AllowNull(false) 356 @AllowNull(false)
358 @Default(false) 357 @Default(false)
359 @Is( 358 @Is(
360 'UserNoInstanceConfigWarningModal', 359 'UserNoWelcomeModal',
361 value => throwIfNotValid(value, isNoWelcomeModal, 'no welcome modal') 360 value => throwIfNotValid(value, isUserNoModal, 'no welcome modal')
362 ) 361 )
363 @Column 362 @Column
364 noWelcomeModal: boolean 363 noWelcomeModal: boolean
365 364
365 @AllowNull(false)
366 @Default(false)
367 @Is(
368 'UserNoAccountSetupWarningModal',
369 value => throwIfNotValid(value, isUserNoModal, 'no account setup warning modal')
370 )
371 @Column
372 noAccountSetupWarningModal: boolean
373
366 @AllowNull(true) 374 @AllowNull(true)
367 @Default(null) 375 @Default(null)
368 @Column 376 @Column
@@ -920,6 +928,7 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
920 928
921 noInstanceConfigWarningModal: this.noInstanceConfigWarningModal, 929 noInstanceConfigWarningModal: this.noInstanceConfigWarningModal,
922 noWelcomeModal: this.noWelcomeModal, 930 noWelcomeModal: this.noWelcomeModal,
931 noAccountSetupWarningModal: this.noAccountSetupWarningModal,
923 932
924 blocked: this.blocked, 933 blocked: this.blocked,
925 blockedReason: this.blockedReason, 934 blockedReason: this.blockedReason,