(c *gin.Context)
| 157 | } |
| 158 | |
| 159 | func CanServeFrontendPath(c *gin.Context) bool { |
| 160 | if !IsFrontendPath(c.Request.URL.Path) { |
| 161 | return false |
| 162 | } |
| 163 | if isPublicFileSharePagePath(c.Request.URL.Path) { |
| 164 | return true |
| 165 | } |
| 166 | authService := service.NewIAuthService() |
| 167 | if authService.GetSecurityEntrance() != "" { |
| 168 | return checkEntrance(c) || authService.IsLogin(c) |
| 169 | } |
| 170 | return true |
| 171 | } |
| 172 | |
| 173 | func isPublicFileSharePagePath(path string) bool { |
| 174 | reqUri := strings.TrimSuffix(path, "/") |
no test coverage detected