Hide krbPrincipalKey
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2024-05-31 17:19:12 +02:00
parent daab7bf699
commit a9eae79414

View File

@ -55,7 +55,7 @@ func tryLogin(w http.ResponseWriter, r *http.Request) {
cnt := "<ul>" cnt := "<ul>"
for _, e := range entries { for _, e := range entries {
for i, v := range e.Values { for i, v := range e.Values {
if e.Name == "userPassword" { if e.Name == "userPassword" || e.Name == "krbPrincipalKey" {
cnt += "<li><strong>" + e.Name + ":</strong> <em>[...]</em></li>" cnt += "<li><strong>" + e.Name + ":</strong> <em>[...]</em></li>"
} else if e.Name == "mailAlias" && len(strings.SplitN(v, "@", 2)[0]) == 10 { } else if e.Name == "mailAlias" && len(strings.SplitN(v, "@", 2)[0]) == 10 {
cnt += "<li id='" + fmt.Sprintf("mailAlias-%d", i) + "'><strong>" + e.Name + ":</strong> " + v + `<button type="button" class="mx-1 btn btn-sm btn-danger" onclick="fetch('/api/v1/aliases/` + v + `', {'method': 'delete', 'headers': {'Authorization': 'Bearer ` + apiToken + `'}}).then((res) => { if (res.ok) document.getElementById('` + fmt.Sprintf("mailAlias-%d", i) + `').remove(); });">Supprimer</a></li>` cnt += "<li id='" + fmt.Sprintf("mailAlias-%d", i) + "'><strong>" + e.Name + ":</strong> " + v + `<button type="button" class="mx-1 btn btn-sm btn-danger" onclick="fetch('/api/v1/aliases/` + v + `', {'method': 'delete', 'headers': {'Authorization': 'Bearer ` + apiToken + `'}}).then((res) => { if (res.ok) document.getElementById('` + fmt.Sprintf("mailAlias-%d", i) + `').remove(); });">Supprimer</a></li>`