add details to aud mismatch message
This commit is contained in:
@@ -62,7 +62,7 @@ func (s *private) createCommentCtrl(w http.ResponseWriter, r *http.Request) {
|
||||
user := rest.MustGetUserInfo(r)
|
||||
if user.ID != "admin" && user.SiteID != comment.Locator.SiteID {
|
||||
rest.SendErrorJSON(w, r, http.StatusForbidden,
|
||||
errors.New("site mismatch, not allowed to post to "+comment.Locator.SiteID), "invalid site",
|
||||
fmt.Errorf("site mismatch, %q not allowed to post to %s", user.SiteID, comment.Locator.SiteID), "invalid site",
|
||||
rest.ErrCommentValidation)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user