This commit is contained in:
2023-05-20 08:17:00 -05:00
parent 660dbfa101
commit ca99c8850d

View File

@@ -81,7 +81,10 @@ func authMiddleware(allowedGroups []string) gin.HandlerFunc {
// If the user is not in any of the allowed groups, respond with unauthorized access
if !isAllowed {
c.AbortWithStatusJSON(http.StatusUnauthorized, gin.H{"message": "Unauthorized access"})
c.AbortWithStatusJSON(http.StatusUnauthorized, gin.H{
"message": "Unauthorized access",
"groups": groupsHeader,
})
return
}