From 9397517a2618e121945273a7e8b1e511b20b5b99 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 25 Oct 2022 15:02:14 +0200 Subject: [PATCH] Deleting an abuse is only for admins --- .../shared/shared-abuse-list/abuse-list-table.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts index 32d3b0093..a3a71ae20 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts @@ -2,7 +2,6 @@ import * as debug from 'debug' import truncate from 'lodash-es/truncate' import { SortMeta } from 'primeng/api' import { Component, Input, OnInit, ViewChild } from '@angular/core' -import { DomSanitizer } from '@angular/platform-browser' import { ActivatedRoute, Router } from '@angular/router' import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core' 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 videoBlocklistService: VideoBlockService, private confirmService: ConfirmService, - private markdownRenderer: MarkdownService, - private sanitizer: DomSanitizer + private markdownRenderer: MarkdownService ) { super() } @@ -274,7 +272,8 @@ export class AbuseListTableComponent extends RestTable implements OnInit { }, { label: $localize`Delete report`, - handler: abuse => this.isAdminView() && this.removeAbuse(abuse) + handler: abuse => this.removeAbuse(abuse), + isDisplayed: () => this.isAdminView() } ] }