FrontBootConf loads an open JSON struct for start configuration. As it can be called directly as a simple GET /a/frontend/bootconf, this endpoint can rely on Cookie for authentication
(req *restful.Request, rsp *restful.Response)
| 126 | // FrontBootConf loads an open JSON struct for start configuration. As it can be called |
| 127 | // directly as a simple GET /a/frontend/bootconf, this endpoint can rely on Cookie for authentication |
| 128 | func (a *FrontendHandler) FrontBootConf(req *restful.Request, rsp *restful.Response) error { |
| 129 | |
| 130 | ctx := req.Request.Context() |
| 131 | pool, e := frontend.GetPluginsPool() |
| 132 | if e != nil { |
| 133 | return e |
| 134 | } |
| 135 | showVersion := false |
| 136 | user := &frontend.User{} |
| 137 | if e := user.Load(ctx); e == nil && user.Logged { |
| 138 | showVersion = true |
| 139 | } |
| 140 | bootConf, e := frontend.ComputeBootConf(ctx, pool, showVersion) |
| 141 | if e != nil { |
| 142 | return e |
| 143 | } |
| 144 | _ = rsp.WriteAsJson(bootConf) |
| 145 | return nil |
| 146 | } |
| 147 | |
| 148 | // FrontPlugins dumps a full list of available frontend plugins |
| 149 | func (a *FrontendHandler) FrontPlugins(req *restful.Request, rsp *restful.Response) error { |
nothing calls this directly
no test coverage detected