aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/account')
-rw-r--r--server/models/account/user.ts25
1 files changed, 21 insertions, 4 deletions
diff --git a/server/models/account/user.ts b/server/models/account/user.ts
index afa9d7be0..8afd246b2 100644
--- a/server/models/account/user.ts
+++ b/server/models/account/user.ts
@@ -1,19 +1,36 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import { 2import {
3 AllowNull, BeforeCreate, BeforeUpdate, Column, CreatedAt, DataType, Default, DefaultScope, HasMany, HasOne, Is, IsEmail, Model, 3 AllowNull,
4 Scopes, Table, UpdatedAt 4 BeforeCreate,
5 BeforeUpdate,
6 Column,
7 CreatedAt,
8 DataType,
9 Default,
10 DefaultScope,
11 HasMany,
12 HasOne,
13 Is,
14 IsEmail,
15 Model,
16 Scopes,
17 Table,
18 UpdatedAt
5} from 'sequelize-typescript' 19} from 'sequelize-typescript'
6import { hasUserRight, USER_ROLE_LABELS, UserRight } from '../../../shared' 20import { hasUserRight, USER_ROLE_LABELS, UserRight } from '../../../shared'
7import { User, UserRole } from '../../../shared/models/users' 21import { User, UserRole } from '../../../shared/models/users'
8import { 22import {
9 isUserAutoPlayVideoValid, isUserDisplayNSFWValid, isUserPasswordValid, isUserRoleValid, isUserUsernameValid, 23 isUserAutoPlayVideoValid,
24 isUserDisplayNSFWValid,
25 isUserPasswordValid,
26 isUserRoleValid,
27 isUserUsernameValid,
10 isUserVideoQuotaValid 28 isUserVideoQuotaValid
11} from '../../helpers/custom-validators/users' 29} from '../../helpers/custom-validators/users'
12import { comparePassword, cryptPassword } from '../../helpers/peertube-crypto' 30import { comparePassword, cryptPassword } from '../../helpers/peertube-crypto'
13import { OAuthTokenModel } from '../oauth/oauth-token' 31import { OAuthTokenModel } from '../oauth/oauth-token'
14import { getSort, throwIfNotValid } from '../utils' 32import { getSort, throwIfNotValid } from '../utils'
15import { VideoChannelModel } from '../video/video-channel' 33import { VideoChannelModel } from '../video/video-channel'
16import { VideoCommentModel } from '../video/video-comment'
17import { AccountModel } from './account' 34import { AccountModel } from './account'
18 35
19@DefaultScope({ 36@DefaultScope({