diff options
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/users/user.model.ts | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/client/src/app/core/users/user.model.ts b/client/src/app/core/users/user.model.ts index 5e1fb1c8d..7467519c4 100644 --- a/client/src/app/core/users/user.model.ts +++ b/client/src/app/core/users/user.model.ts | |||
@@ -137,26 +137,4 @@ export class User implements UserServerModel { | |||
137 | isAutoBlocked () { | 137 | isAutoBlocked () { |
138 | return this.role === UserRole.USER && this.adminFlags !== UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST | 138 | return this.role === UserRole.USER && this.adminFlags !== UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST |
139 | } | 139 | } |
140 | |||
141 | hasNoQuotaLeft () { | ||
142 | // unlimited videoQuota | ||
143 | if (this.videoQuota === -1) return false | ||
144 | |||
145 | // no more videoQuota | ||
146 | if (!this.videoQuotaUsed) return true | ||
147 | |||
148 | // videoQuota left lower than 10% | ||
149 | return this.videoQuotaUsed > this.videoQuota * 0.9 | ||
150 | } | ||
151 | |||
152 | hasNoQuotaLeftDaily () { | ||
153 | // unlimited videoQuotaDaily | ||
154 | if (this.videoQuotaDaily === -1) return false | ||
155 | |||
156 | // no more videoQuotaDaily | ||
157 | if (!this.videoQuotaUsedDaily) return true | ||
158 | |||
159 | // videoQuotaDaily left lower than 10% | ||
160 | return this.videoQuotaUsedDaily > this.videoQuotaDaily * 0.9 | ||
161 | } | ||
162 | } | 140 | } |