options: wrap missing-email-validation error message

This commit is contained in:
Pierce Lopez 2017-08-05 12:54:31 -04:00
parent e9bbecface
commit 3d8b59ef71

View File

@ -134,7 +134,8 @@ func (o *Options) Validate() error {
msgs = append(msgs, "missing setting: client-secret")
}
if o.AuthenticatedEmailsFile == "" && len(o.EmailDomains) == 0 && o.HtpasswdFile == "" {
msgs = append(msgs, "missing setting for email validation: email-domain or authenticated-emails-file required.\n use email-domain=* to authorize all email addresses")
msgs = append(msgs, "missing setting for email validation: email-domain or authenticated-emails-file required."+
"\n use email-domain=* to authorize all email addresses")
}
o.redirectURL, msgs = parseURL(o.RedirectURL, "redirect", msgs)