diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-08 11:26:17 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-11 09:37:26 +0200 |
commit | e0b1231b2075e81afe06c2df4fdf55e148f05f3a (patch) | |
tree | dead1349c36073bb177c5028a9fb6dac094cf0ce /client/src/app/core | |
parent | ab7b4f525b2edef5379ed8eb6abe223186380197 (diff) | |
download | PeerTube-e0b1231b2075e81afe06c2df4fdf55e148f05f3a.tar.gz PeerTube-e0b1231b2075e81afe06c2df4fdf55e148f05f3a.tar.zst PeerTube-e0b1231b2075e81afe06c2df4fdf55e148f05f3a.zip |
Fix autoblock message on upload page
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/users/user.model.ts | 5 |
1 files changed, 4 insertions, 1 deletions
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' | |||
2 | import { hasUserRight } from '@shared/core-utils/users' | 2 | import { hasUserRight } from '@shared/core-utils/users' |
3 | import { | 3 | import { |
4 | ActorImage, | 4 | ActorImage, |
5 | HTMLServerConfig, | ||
5 | NSFWPolicyType, | 6 | NSFWPolicyType, |
6 | User as UserServerModel, | 7 | User as UserServerModel, |
7 | UserAdminFlag, | 8 | UserAdminFlag, |
@@ -136,7 +137,9 @@ export class User implements UserServerModel { | |||
136 | return this.videoQuota === 0 || this.videoQuotaDaily === 0 | 137 | return this.videoQuota === 0 || this.videoQuotaDaily === 0 |
137 | } | 138 | } |
138 | 139 | ||
139 | isAutoBlocked () { | 140 | isAutoBlocked (serverConfig: HTMLServerConfig) { |
141 | if (serverConfig.autoBlacklist.videos.ofUsers.enabled !== true) return false | ||
142 | |||
140 | return this.role === UserRole.USER && this.adminFlags !== UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST | 143 | return this.role === UserRole.USER && this.adminFlags !== UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST |
141 | } | 144 | } |
142 | } | 145 | } |