Fix nil reference when trying to edit student responses to survey
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2942452d85
commit
a553b8bf25
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user