mirror of
https://github.com/documize/community.git
synced 2025-07-22 14:49:42 +02:00
authConfig persistence bug, session vars bug
This commit is contained in:
parent
585c4468c1
commit
6f98db5c29
8 changed files with 693 additions and 660 deletions
|
@ -233,3 +233,21 @@ type authData struct {
|
|||
AuthProvider string `json:"authProvider"`
|
||||
AuthConfig string `json:"authConfig"`
|
||||
}
|
||||
|
||||
// GetAuthConfig returns installation-wide auth configuration
|
||||
func GetAuthConfig(w http.ResponseWriter, r *http.Request) {
|
||||
p := request.GetPersister(r)
|
||||
|
||||
if !p.Context.Global {
|
||||
writeForbiddenError(w)
|
||||
return
|
||||
}
|
||||
|
||||
org, err := p.GetOrganization(p.Context.OrgID)
|
||||
if err != nil {
|
||||
writeForbiddenError(w)
|
||||
return
|
||||
}
|
||||
|
||||
util.WriteJSON(w, org.AuthConfig)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue