MCPcopy Create free account
hub / github.com/pydio/cells / FrontBootConf

Method FrontBootConf

frontend/rest/rest.go:128–146  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
128func (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
149func (a *FrontendHandler) FrontPlugins(req *restful.Request, rsp *restful.Response) error {

Callers

nothing calls this directly

Calls 4

LoadMethod · 0.95
GetPluginsPoolFunction · 0.92
ComputeBootConfFunction · 0.92
ContextMethod · 0.65

Tested by

no test coverage detected