]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video/video.model.ts
rename blacklist to block/blocklist, merge block and auto-block views
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / video.model.ts
index 97759f9c1b3f7679d8bafb14c92fa723670bebb3..2b3d915ef9d45b531bcf7bf3658606dadab191bd 100644 (file)
@@ -54,7 +54,7 @@ export class Video implements VideoServerModel {
   state?: VideoConstant<VideoState>
   scheduledUpdate?: VideoScheduleUpdate
   blacklisted?: boolean
-  blacklistedReason?: string
+  blockedReason?: string
 
   account: {
     id: number
@@ -140,7 +140,7 @@ export class Video implements VideoServerModel {
     if (this.state) this.state.label = peertubeTranslate(this.state.label, translations)
 
     this.blacklisted = hash.blacklisted
-    this.blacklistedReason = hash.blacklistedReason
+    this.blockedReason = hash.blacklistedReason
 
     this.userHistory = hash.userHistory
 
@@ -163,12 +163,12 @@ export class Video implements VideoServerModel {
     return user && this.isLocal === true && (this.account.name === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO))
   }
 
-  isBlackistableBy (user: AuthUser) {
-    return this.blacklisted !== true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true
+  isBlockableBy (user: AuthUser) {
+    return this.blacklisted !== true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLOCKS) === true
   }
 
-  isUnblacklistableBy (user: AuthUser) {
-    return this.blacklisted === true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLACKLIST) === true
+  isUnblockableBy (user: AuthUser) {
+    return this.blacklisted === true && user && user.hasRight(UserRight.MANAGE_VIDEO_BLOCKS) === true
   }
 
   isUpdatableBy (user: AuthUser) {