(module string)
| 123 | } |
| 124 | |
| 125 | func HeaderNavModulePublicOrUserAuth(module string) gin.HandlerFunc { |
| 126 | return func(c *gin.Context) { |
| 127 | access := getHeaderNavAccess(module) |
| 128 | if !access.Enabled || access.RequireAuth { |
| 129 | UserAuth()(c) |
| 130 | return |
| 131 | } |
| 132 | |
| 133 | TryUserAuth()(c) |
| 134 | } |
| 135 | } |