aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-15 10:49:46 +0200
committerChocobozzz <me@florianbigard.com>2019-04-15 14:39:52 +0200
commit1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a (patch)
tree91a10310cdf924779527525d39f8eb7e09e4ba49 /shared/models
parent31b48aad478506d4214586f02792816efa968e4b (diff)
downloadPeerTube-1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a.tar.gz
PeerTube-1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a.tar.zst
PeerTube-1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a.zip
Add user adminFlags
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/users/user-create.model.ts2
-rw-r--r--shared/models/users/user-flag.model.ts4
-rw-r--r--shared/models/users/user-update.model.ts2
-rw-r--r--shared/models/users/user.model.ts5
4 files changed, 13 insertions, 0 deletions
diff --git a/shared/models/users/user-create.model.ts b/shared/models/users/user-create.model.ts
index 08be4db05..6677b42aa 100644
--- a/shared/models/users/user-create.model.ts
+++ b/shared/models/users/user-create.model.ts
@@ -1,4 +1,5 @@
1import { UserRole } from './user-role' 1import { UserRole } from './user-role'
2import { UserAdminFlag } from './user-flag.model'
2 3
3export interface UserCreate { 4export interface UserCreate {
4 username: string 5 username: string
@@ -7,4 +8,5 @@ export interface UserCreate {
7 videoQuota: number 8 videoQuota: number
8 videoQuotaDaily: number 9 videoQuotaDaily: number
9 role: UserRole 10 role: UserRole
11 adminFlags?: UserAdminFlag
10} 12}
diff --git a/shared/models/users/user-flag.model.ts b/shared/models/users/user-flag.model.ts
new file mode 100644
index 000000000..f5759f18f
--- /dev/null
+++ b/shared/models/users/user-flag.model.ts
@@ -0,0 +1,4 @@
1export enum UserAdminFlag {
2 NONE = 0,
3 BY_PASS_VIDEO_AUTO_BLACKLIST = 1 << 0
4}
diff --git a/shared/models/users/user-update.model.ts b/shared/models/users/user-update.model.ts
index cd215bab3..fa43487ac 100644
--- a/shared/models/users/user-update.model.ts
+++ b/shared/models/users/user-update.model.ts
@@ -1,4 +1,5 @@
1import { UserRole } from './user-role' 1import { UserRole } from './user-role'
2import { UserAdminFlag } from './user-flag.model'
2 3
3export interface UserUpdate { 4export interface UserUpdate {
4 password?: string 5 password?: string
@@ -7,4 +8,5 @@ export interface UserUpdate {
7 videoQuota?: number 8 videoQuota?: number
8 videoQuotaDaily?: number 9 videoQuotaDaily?: number
9 role?: UserRole 10 role?: UserRole
11 adminFlags?: UserAdminFlag
10} 12}
diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts
index af783d389..2f6a3c719 100644
--- a/shared/models/users/user.model.ts
+++ b/shared/models/users/user.model.ts
@@ -3,6 +3,7 @@ import { VideoChannel } from '../videos/channel/video-channel.model'
3import { UserRole } from './user-role' 3import { UserRole } from './user-role'
4import { NSFWPolicyType } from '../videos/nsfw-policy.type' 4import { NSFWPolicyType } from '../videos/nsfw-policy.type'
5import { UserNotificationSetting } from './user-notification-setting.model' 5import { UserNotificationSetting } from './user-notification-setting.model'
6import { UserAdminFlag } from './user-flag.model'
6 7
7export interface User { 8export interface User {
8 id: number 9 id: number
@@ -11,11 +12,15 @@ export interface User {
11 emailVerified: boolean 12 emailVerified: boolean
12 nsfwPolicy: NSFWPolicyType 13 nsfwPolicy: NSFWPolicyType
13 14
15 adminFlags?: UserAdminFlag
16
14 autoPlayVideo: boolean 17 autoPlayVideo: boolean
15 webTorrentEnabled: boolean 18 webTorrentEnabled: boolean
16 videosHistoryEnabled: boolean 19 videosHistoryEnabled: boolean
17 20
18 role: UserRole 21 role: UserRole
22 roleLabel: string
23
19 videoQuota: number 24 videoQuota: number
20 videoQuotaDaily: number 25 videoQuotaDaily: number
21 createdAt: Date 26 createdAt: Date