aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/users/user-notification-setting.model.ts3
-rw-r--r--shared/models/users/user-notification.model.ts24
-rw-r--r--shared/models/users/user-right.enum.ts5
-rw-r--r--shared/models/users/user-role.ts3
4 files changed, 33 insertions, 2 deletions
diff --git a/shared/models/users/user-notification-setting.model.ts b/shared/models/users/user-notification-setting.model.ts
index 55d351abf..f580e827e 100644
--- a/shared/models/users/user-notification-setting.model.ts
+++ b/shared/models/users/user-notification-setting.model.ts
@@ -12,4 +12,7 @@ export interface UserNotificationSetting {
12 blacklistOnMyVideo: UserNotificationSettingValue 12 blacklistOnMyVideo: UserNotificationSettingValue
13 myVideoPublished: UserNotificationSettingValue 13 myVideoPublished: UserNotificationSettingValue
14 myVideoImportFinished: UserNotificationSettingValue 14 myVideoImportFinished: UserNotificationSettingValue
15 newUserRegistration: UserNotificationSettingValue
16 newFollow: UserNotificationSettingValue
17 commentMention: UserNotificationSettingValue
15} 18}
diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts
index ee9ac275a..9dd4f099f 100644
--- a/shared/models/users/user-notification.model.ts
+++ b/shared/models/users/user-notification.model.ts
@@ -6,7 +6,10 @@ export enum UserNotificationType {
6 UNBLACKLIST_ON_MY_VIDEO = 5, 6 UNBLACKLIST_ON_MY_VIDEO = 5,
7 MY_VIDEO_PUBLISHED = 6, 7 MY_VIDEO_PUBLISHED = 6,
8 MY_VIDEO_IMPORT_SUCCESS = 7, 8 MY_VIDEO_IMPORT_SUCCESS = 7,
9 MY_VIDEO_IMPORT_ERROR = 8 9 MY_VIDEO_IMPORT_ERROR = 8,
10 NEW_USER_REGISTRATION = 9,
11 NEW_FOLLOW = 10,
12 COMMENT_MENTION = 11
10} 13}
11 14
12export interface VideoInfo { 15export interface VideoInfo {
@@ -55,6 +58,25 @@ export interface UserNotification {
55 video: VideoInfo 58 video: VideoInfo
56 } 59 }
57 60
61 account?: {
62 id: number
63 displayName: string
64 name: string
65 }
66
67 actorFollow?: {
68 id: number
69 follower: {
70 name: string
71 displayName: string
72 }
73 following: {
74 type: 'account' | 'channel'
75 name: string
76 displayName: string
77 }
78 }
79
58 createdAt: string 80 createdAt: string
59 updatedAt: string 81 updatedAt: string
60} 82}
diff --git a/shared/models/users/user-right.enum.ts b/shared/models/users/user-right.enum.ts
index 51c59d20a..090256bca 100644
--- a/shared/models/users/user-right.enum.ts
+++ b/shared/models/users/user-right.enum.ts
@@ -2,10 +2,15 @@ export enum UserRight {
2 ALL, 2 ALL,
3 3
4 MANAGE_USERS, 4 MANAGE_USERS,
5
5 MANAGE_SERVER_FOLLOW, 6 MANAGE_SERVER_FOLLOW,
7
6 MANAGE_SERVER_REDUNDANCY, 8 MANAGE_SERVER_REDUNDANCY,
9
7 MANAGE_VIDEO_ABUSES, 10 MANAGE_VIDEO_ABUSES,
11
8 MANAGE_JOBS, 12 MANAGE_JOBS,
13
9 MANAGE_CONFIGURATION, 14 MANAGE_CONFIGURATION,
10 15
11 MANAGE_ACCOUNTS_BLOCKLIST, 16 MANAGE_ACCOUNTS_BLOCKLIST,
diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts
index adef8fd95..59c2ba106 100644
--- a/shared/models/users/user-role.ts
+++ b/shared/models/users/user-role.ts
@@ -29,7 +29,8 @@ const userRoleRights: { [ id: number ]: UserRight[] } = {
29 UserRight.UPDATE_ANY_VIDEO, 29 UserRight.UPDATE_ANY_VIDEO,
30 UserRight.SEE_ALL_VIDEOS, 30 UserRight.SEE_ALL_VIDEOS,
31 UserRight.MANAGE_ACCOUNTS_BLOCKLIST, 31 UserRight.MANAGE_ACCOUNTS_BLOCKLIST,
32 UserRight.MANAGE_SERVERS_BLOCKLIST 32 UserRight.MANAGE_SERVERS_BLOCKLIST,
33 UserRight.MANAGE_USERS
33 ], 34 ],
34 35
35 [UserRole.USER]: [] 36 [UserRole.USER]: []