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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user