mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Show admins incomplete config indicator
SMTP checks to start with.
This commit is contained in:
parent
b2cd375936
commit
80f0876b51
7 changed files with 31 additions and 4 deletions
|
@ -27,6 +27,7 @@ import (
|
|||
"github.com/documize/community/domain/auth"
|
||||
"github.com/documize/community/domain/organization"
|
||||
indexer "github.com/documize/community/domain/search"
|
||||
"github.com/documize/community/domain/setting"
|
||||
"github.com/documize/community/domain/store"
|
||||
"github.com/documize/community/model/doc"
|
||||
"github.com/documize/community/model/org"
|
||||
|
@ -67,6 +68,13 @@ func (h *Handler) Meta(w http.ResponseWriter, r *http.Request) {
|
|||
data.Storage = h.Runtime.StoreProvider.Type()
|
||||
data.Location = h.Runtime.Flags.Location // reserved
|
||||
|
||||
// Is product setup complete? SMTP in this case.
|
||||
data.Configured = true
|
||||
cfg := setting.GetSMTPConfig(h.Store)
|
||||
if len(cfg.Host) == 0 {
|
||||
data.Configured = false
|
||||
}
|
||||
|
||||
// Strip secrets
|
||||
data.AuthConfig = auth.StripAuthSecrets(h.Runtime, org.AuthProvider, org.AuthConfig)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue