mirror of https://github.com/Chocobozzz/PeerTube
Deleting an abuse is only for admins
parent
e82cb08722
commit
9397517a26
|
@ -2,7 +2,6 @@ import * as debug from 'debug'
|
||||||
import truncate from 'lodash-es/truncate'
|
import truncate from 'lodash-es/truncate'
|
||||||
import { SortMeta } from 'primeng/api'
|
import { SortMeta } from 'primeng/api'
|
||||||
import { Component, Input, OnInit, ViewChild } from '@angular/core'
|
import { Component, Input, OnInit, ViewChild } from '@angular/core'
|
||||||
import { DomSanitizer } from '@angular/platform-browser'
|
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core'
|
import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core'
|
||||||
import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main'
|
import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main'
|
||||||
|
@ -73,8 +72,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
|
||||||
private videoService: VideoService,
|
private videoService: VideoService,
|
||||||
private videoBlocklistService: VideoBlockService,
|
private videoBlocklistService: VideoBlockService,
|
||||||
private confirmService: ConfirmService,
|
private confirmService: ConfirmService,
|
||||||
private markdownRenderer: MarkdownService,
|
private markdownRenderer: MarkdownService
|
||||||
private sanitizer: DomSanitizer
|
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
@ -274,7 +272,8 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: $localize`Delete report`,
|
label: $localize`Delete report`,
|
||||||
handler: abuse => this.isAdminView() && this.removeAbuse(abuse)
|
handler: abuse => this.removeAbuse(abuse),
|
||||||
|
isDisplayed: () => this.isAdminView()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue