Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

banned users cannot comment

Cette révision appartient à :
kilo 2017-11-10 12:39:38 +01:00 révisé par GitHub
Parent e968d0bae6
révision 85cb0df709
Signature inconnue de Forgejo
ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 3 ajouts et 0 suppressions

Voir le fichier

@ -34,6 +34,9 @@ func PostCommentHandler(c *gin.Context) {
messages.AddErrorT("errors", "bad_captcha")
}
}
if currentUser.IsBanned() {
messages.AddErrorT("errors", "account_banned")
}
content := sanitize.Sanitize(c.PostForm("comment"), "comment")
userID := currentUser.ID