Hide log out button when auth is not enabled (#9158)

This was an oversight in #8757: the new "Log out" button is always shown
in the "Actions" menu, even when authentication is not enabled.
This commit is contained in:
Emil Lundberg
2023-10-15 14:10:41 +02:00
committed by GitHub
parent a405c21ebb
commit 14569f12d3
3 changed files with 14 additions and 3 deletions
+1
View File
@@ -19,6 +19,7 @@ import (
)
func (c GUIConfiguration) IsAuthEnabled() bool {
// This function should match isAuthEnabled() in syncthingController.js
return c.AuthMode == AuthModeLDAP || (len(c.User) > 0 && len(c.Password) > 0)
}