Fix nil reference when trying to edit student responses to survey
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-10-20 17:53:33 +02:00
parent 2942452d85
commit a553b8bf25

View File

@ -18,7 +18,7 @@ func declareAPIAuthResponsesRoutes(router *gin.RouterGroup) {
var u *User
if user, ok := c.Get("user"); ok {
if !u.IsAdmin {
if !uauth.IsAdmin {
c.AbortWithStatusJSON(http.StatusForbidden, gin.H{"errmsg": "Not authorized"})
return
}