Improve inspect page
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Quentin 2024-02-12 19:52:19 +01:00
parent 1a9d750de7
commit aff7efd726
Signed by: quentin
GPG Key ID: E9602264D639FF68
3 changed files with 32 additions and 2 deletions

View File

@ -225,6 +225,9 @@ func (lu *LoggedUser) WelcomeName() string {
}
return ret
}
func (lu *LoggedUser) Email() string {
return lu.Entry.GetAttributeValue("mail")
}
func (lu *LoggedUser) S3KeyInfo() (*garage.KeyInfo, error) {
var err error
var keyPair *garage.KeyInfo

View File

@ -6,6 +6,11 @@ import (
"net/http"
)
type PimInspectView struct {
User *LoggedUser
Debug string
}
func handlePimInspect(w http.ResponseWriter, r *http.Request) {
user := RequireUserHtml(w, r)
if user == nil {
@ -24,8 +29,13 @@ func handlePimInspect(w http.ResponseWriter, r *http.Request) {
return
}
view := PimInspectView {
User: user,
Debug: string(pim_json),
}
tKey := getTemplate("pim_inspect.html")
tKey.Execute(w, string(pim_json))
tKey.Execute(w, view)
}
func handlePimSetup(w http.ResponseWriter, r *http.Request) {

View File

@ -10,7 +10,24 @@
<div class="col-md-12 mt-3">
<div class="alert alert-danger">PAGE DE DEBUG, NON CONFORME POUR UNE MISE EN PRODUCTION</div>
</div>
<pre>{{ . }}</pre>
<pre>
--- login info ---
email: {{ .User.Email }}
username: {{ .User.Login.Info.Username }}
password: ********
--- autodiscovery ---
Implemented: RFC6186 DNS SRV autodiscovery + Thunderbird Autoconfig
Not implemented: Microsoft Autodiscover + Apple Mobileconfig
--- manual configuration ---
IMAP: imap.saint-ex.deuxfleurs.org:993 (TLS)
SMTP: smtp.saint-ex.deuxfleurs.org:465 (TLS)
--- dump PIM controller ---
{{ .Debug }}
</pre>
</div>
{{end}}