From e0b1231b2075e81afe06c2df4fdf55e148f05f3a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 8 Oct 2021 11:26:17 +0200 Subject: Fix autoblock message on upload page --- client/src/app/core/users/user.model.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client/src/app/core/users') diff --git a/client/src/app/core/users/user.model.ts b/client/src/app/core/users/user.model.ts index 00078af5d..c0e5d3169 100644 --- a/client/src/app/core/users/user.model.ts +++ b/client/src/app/core/users/user.model.ts @@ -2,6 +2,7 @@ import { Account } from '@app/shared/shared-main/account/account.model' import { hasUserRight } from '@shared/core-utils/users' import { ActorImage, + HTMLServerConfig, NSFWPolicyType, User as UserServerModel, UserAdminFlag, @@ -136,7 +137,9 @@ export class User implements UserServerModel { return this.videoQuota === 0 || this.videoQuotaDaily === 0 } - isAutoBlocked () { + isAutoBlocked (serverConfig: HTMLServerConfig) { + if (serverConfig.autoBlacklist.videos.ofUsers.enabled !== true) return false + return this.role === UserRole.USER && this.adminFlags !== UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST } } -- cgit v1.2.3