]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/admin.component.ts
Support official plugins
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / admin.component.ts
index 27d5e0a101b7b9b333920d5e23aa332d3ea46169..b8a957d1c451cccf3468e630debdc7ef6a9f2391 100644 (file)
@@ -44,6 +44,14 @@ export class AdminComponent implements OnInit {
       })
     }
 
+    if (this.hasVideosRight()) {
+      overviewItems.children.push({
+        label: $localize`Videos`,
+        routerLink: '/admin/videos',
+        iconName: 'videos'
+      })
+    }
+
     if (overviewItems.children.length !== 0) {
       this.menuEntries.push(overviewItems)
     }
@@ -217,4 +225,8 @@ export class AdminComponent implements OnInit {
   private hasVideoCommentsRight () {
     return this.auth.getUser().hasRight(UserRight.SEE_ALL_COMMENTS)
   }
+
+  private hasVideosRight () {
+    return this.auth.getUser().hasRight(UserRight.SEE_ALL_VIDEOS)
+  }
 }