diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/account/user.ts | 25 |
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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { | 2 | import { |
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' |
6 | import { hasUserRight, USER_ROLE_LABELS, UserRight } from '../../../shared' | 20 | import { hasUserRight, USER_ROLE_LABELS, UserRight } from '../../../shared' |
7 | import { User, UserRole } from '../../../shared/models/users' | 21 | import { User, UserRole } from '../../../shared/models/users' |
8 | import { | 22 | import { |
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' |
12 | import { comparePassword, cryptPassword } from '../../helpers/peertube-crypto' | 30 | import { comparePassword, cryptPassword } from '../../helpers/peertube-crypto' |
13 | import { OAuthTokenModel } from '../oauth/oauth-token' | 31 | import { OAuthTokenModel } from '../oauth/oauth-token' |
14 | import { getSort, throwIfNotValid } from '../utils' | 32 | import { getSort, throwIfNotValid } from '../utils' |
15 | import { VideoChannelModel } from '../video/video-channel' | 33 | import { VideoChannelModel } from '../video/video-channel' |
16 | import { VideoCommentModel } from '../video/video-comment' | ||
17 | import { AccountModel } from './account' | 34 | import { AccountModel } from './account' |
18 | 35 | ||
19 | @DefaultScope({ | 36 | @DefaultScope({ |