import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type'
import { isThemeNameValid } from '../../helpers/custom-validators/plugins'
import {
- isNoInstanceConfigWarningModal,
- isNoWelcomeModal,
isUserAdminFlagsValid,
isUserAutoPlayNextVideoPlaylistValid,
isUserAutoPlayNextVideoValid,
isUserBlockedReasonValid,
isUserBlockedValid,
isUserEmailVerifiedValid,
+ isUserNoModal,
isUserNSFWPolicyValid,
isUserPasswordValid,
isUserRoleValid,
@Default(false)
@Is(
'UserNoInstanceConfigWarningModal',
- value => throwIfNotValid(value, isNoInstanceConfigWarningModal, 'no instance config warning modal')
+ value => throwIfNotValid(value, isUserNoModal, 'no instance config warning modal')
)
@Column
noInstanceConfigWarningModal: boolean
@AllowNull(false)
@Default(false)
@Is(
- 'UserNoInstanceConfigWarningModal',
- value => throwIfNotValid(value, isNoWelcomeModal, 'no welcome modal')
+ 'UserNoWelcomeModal',
+ value => throwIfNotValid(value, isUserNoModal, 'no welcome modal')
)
@Column
noWelcomeModal: boolean
+ @AllowNull(false)
+ @Default(false)
+ @Is(
+ 'UserNoAccountSetupWarningModal',
+ value => throwIfNotValid(value, isUserNoModal, 'no account setup warning modal')
+ )
+ @Column
+ noAccountSetupWarningModal: boolean
+
@AllowNull(true)
@Default(null)
@Column
noInstanceConfigWarningModal: this.noInstanceConfigWarningModal,
noWelcomeModal: this.noWelcomeModal,
+ noAccountSetupWarningModal: this.noAccountSetupWarningModal,
blocked: this.blocked,
blockedReason: this.blockedReason,
}
toMeFormattedJSON (this: MMyUserFormattable): MyUser {
- const formatted = this.toFormattedJSON()
+ const formatted = this.toFormattedJSON({ withAdminFlags: true })
const specialPlaylists = this.Account.VideoPlaylists
.map(p => ({ id: p.id, name: p.name, type: p.type }))