Disallow responding to corrected survey

This commit is contained in:
nemunaire 2022-09-01 17:16:00 +02:00
parent cfbd00beef
commit f0bd1b1e70
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ func declareAPIAuthResponsesRoutes(router *gin.RouterGroup) {
}
for _, response := range responses {
if !uauth.IsAdmin && !s.Shown && (s.Direct == nil || *s.Direct != response.IdQuestion) {
if !uauth.IsAdmin && !s.Shown && (s.Corrected || s.Direct == nil || *s.Direct != response.IdQuestion) {
c.AbortWithStatusJSON(http.StatusForbidden, gin.H{"errmsg": "Cette question n'est pas disponible"})
return
} else if len(response.Answer) > 0 {