(c *gin.Context)
| 770 | } |
| 771 | |
| 772 | func (s *Server) managementAvailable(c *gin.Context) bool { |
| 773 | if s == nil || s.cfg == nil { |
| 774 | c.AbortWithStatus(http.StatusNotFound) |
| 775 | return false |
| 776 | } |
| 777 | if s.cfg.Home.Enabled { |
| 778 | c.AbortWithStatus(http.StatusNotFound) |
| 779 | return false |
| 780 | } |
| 781 | if !s.managementRoutesEnabled.Load() { |
| 782 | c.AbortWithStatus(http.StatusNotFound) |
| 783 | return false |
| 784 | } |
| 785 | return true |
| 786 | } |
| 787 | |
| 788 | func (s *Server) refreshPluginManagementRoutes() { |
| 789 | if s == nil || s.pluginHost == nil || s.engine == nil { |
no test coverage detected