aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-01 16:05:30 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-10 14:02:41 +0200
commitd95d15598847c7f020aa056e7e6e0c02d2bbf732 (patch)
treea8a593f1269688caf9e5f99559996f346290fec5 /shared/models/users
parent72493e44e9b455a04c4f093ed6c6ffa300b98d8b (diff)
downloadPeerTube-d95d15598847c7f020aa056e7e6e0c02d2bbf732.tar.gz
PeerTube-d95d15598847c7f020aa056e7e6e0c02d2bbf732.tar.zst
PeerTube-d95d15598847c7f020aa056e7e6e0c02d2bbf732.zip
Use 3 tables to represent abuses
Diffstat (limited to 'shared/models/users')
-rw-r--r--shared/models/users/user-notification.model.ts15
-rw-r--r--shared/models/users/user-right.enum.ts2
-rw-r--r--shared/models/users/user-role.ts2
3 files changed, 15 insertions, 4 deletions
diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts
index e9be1ca7f..39090f5a1 100644
--- a/shared/models/users/user-notification.model.ts
+++ b/shared/models/users/user-notification.model.ts
@@ -64,9 +64,20 @@ export interface UserNotification {
64 video: VideoInfo 64 video: VideoInfo
65 } 65 }
66 66
67 videoAbuse?: { 67 abuse?: {
68 id: number 68 id: number
69 video: VideoInfo 69
70 video?: VideoInfo
71
72 comment?: {
73 threadId: number
74
75 video: {
76 uuid: string
77 }
78 }
79
80 account?: ActorInfo
70 } 81 }
71 82
72 videoBlacklist?: { 83 videoBlacklist?: {
diff --git a/shared/models/users/user-right.enum.ts b/shared/models/users/user-right.enum.ts
index 2f88a65de..4a7ae4373 100644
--- a/shared/models/users/user-right.enum.ts
+++ b/shared/models/users/user-right.enum.ts
@@ -11,7 +11,7 @@ export enum UserRight {
11 11
12 MANAGE_SERVER_REDUNDANCY, 12 MANAGE_SERVER_REDUNDANCY,
13 13
14 MANAGE_VIDEO_ABUSES, 14 MANAGE_ABUSES,
15 15
16 MANAGE_JOBS, 16 MANAGE_JOBS,
17 17
diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts
index 2b08b5850..772988c0c 100644
--- a/shared/models/users/user-role.ts
+++ b/shared/models/users/user-role.ts
@@ -20,7 +20,7 @@ const userRoleRights: { [ id in UserRole ]: UserRight[] } = {
20 20
21 [UserRole.MODERATOR]: [ 21 [UserRole.MODERATOR]: [
22 UserRight.MANAGE_VIDEO_BLACKLIST, 22 UserRight.MANAGE_VIDEO_BLACKLIST,
23 UserRight.MANAGE_VIDEO_ABUSES, 23 UserRight.MANAGE_ABUSES,
24 UserRight.REMOVE_ANY_VIDEO, 24 UserRight.REMOVE_ANY_VIDEO,
25 UserRight.REMOVE_ANY_VIDEO_CHANNEL, 25 UserRight.REMOVE_ANY_VIDEO_CHANNEL,
26 UserRight.REMOVE_ANY_VIDEO_PLAYLIST, 26 UserRight.REMOVE_ANY_VIDEO_PLAYLIST,