mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Add reason when banning a user
This commit is contained in:
parent
a6ce68673a
commit
eacb25c436
24 changed files with 215 additions and 44 deletions
|
@ -42,6 +42,10 @@ function isUserBlockedValid (value: any) {
|
|||
return isBooleanValid(value)
|
||||
}
|
||||
|
||||
function isUserBlockedReasonValid (value: any) {
|
||||
return value === null || (exists(value) && validator.isLength(value, CONSTRAINTS_FIELDS.USERS.BLOCKED_REASON))
|
||||
}
|
||||
|
||||
function isUserRoleValid (value: any) {
|
||||
return exists(value) && validator.isInt('' + value) && UserRole[value] !== undefined
|
||||
}
|
||||
|
@ -59,6 +63,7 @@ function isAvatarFile (files: { [ fieldname: string ]: Express.Multer.File[] } |
|
|||
export {
|
||||
isUserBlockedValid,
|
||||
isUserPasswordValid,
|
||||
isUserBlockedReasonValid,
|
||||
isUserRoleValid,
|
||||
isUserVideoQuotaValid,
|
||||
isUserUsernameValid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue