fix: handle user parse errors correctly

This commit is contained in:
Stavros
2025-02-07 20:11:16 +02:00
parent d2ee382f92
commit e09f241364
2 changed files with 7 additions and 4 deletions

View File

@@ -104,7 +104,7 @@ func GetUsers(conf string, file string) (types.Users, error) {
var users string
if conf == "" && file == "" {
return types.Users{}, errors.New("no users provided")
return types.Users{}, nil
}
if conf != "" {
@@ -128,7 +128,7 @@ func GetUsers(conf string, file string) (types.Users, error) {
}
func OAuthConfigured(config types.Config) bool {
return (config.GithubClientId != "" && config.GithubClientSecret != "") || (config.GoogleClientId != "" && config.GoogleClientSecret != "") || (config.GenericClientId != "" && config.GenericClientSecret != "")
return (config.GithubClientId != "" && config.GithubClientSecret != "") || (config.GoogleClientId != "" && config.GoogleClientSecret != "") || (config.GenericClientId != "" && config.GenericClientSecret != "") || (config.TailscaleClientId != "" && config.TailscaleClientSecret != "")
}
func GetTinyauthLabels(labels map[string]string) types.TinyauthLabels {