Disallow responding to corrected survey
This commit is contained in:
parent
cfbd00beef
commit
f0bd1b1e70
@ -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 {
|
||||
|
Reference in New Issue
Block a user