comment_new.go: enforce RequireIdentification when anonymous
Yikes, I can't believe I forgot about this.
This commit is contained in:
parent
7fc3910009
commit
52ce1e2660
@ -77,6 +77,11 @@ func commentNewHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if d.RequireIdentification && *x.CommenterToken == "anonymous" {
|
||||
bodyMarshal(w, response{"success": false, "message": errorNotAuthorised.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
// logic: (empty column indicates the value doesn't matter)
|
||||
// | anonymous | moderator | requireIdentification | requireModeration | moderateAllAnonymous | approved? |
|
||||
// |-----------+-----------+-----------------------+-------------------+----------------------+-----------|
|
||||
|
Loading…
Reference in New Issue
Block a user