Skip to content

Commit

Permalink
RHINENG-11685: remove temp debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Dugowitch committed Aug 22, 2024
1 parent 1bdc585 commit 574ac04
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions manager/middlewares/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,24 +192,10 @@ func RBAC() gin.HandlerFunc {
}

return func(c *gin.Context) {
tempLogDebugGinContextRequestHeader(c, "RBAC before")
defer tempLogDebugGinContextRequestHeader(c, "RBAC after")
if isAccessGranted(c) {
return
}
c.AbortWithStatusJSON(http.StatusUnauthorized,
utils.ErrorResponse{Error: "You don't have access to this application"})
}
}

func tempLogDebugGinContextRequestHeader(c *gin.Context, origin string) {
if c != nil {
if c.Request != nil {
utils.LogDebug("origin", origin, "gin_context_req_header", c.Request.Header, "gin context request handler")
} else {
utils.LogDebug("origin", origin, "gin_context_req", nil, "gin context request handler")
}
} else {
utils.LogDebug("origin", origin, "gin_context", nil, "gin context request handler")
}
}

0 comments on commit 574ac04

Please sign in to comment.