clarify required email validation settings

This commit is contained in:
Jehiah Czebotar 2015-07-24 16:09:33 -04:00
parent c086bddcbe
commit 1e48d89e00

View File

@ -103,6 +103,9 @@ func (o *Options) Validate() error {
if o.ClientSecret == "" { if o.ClientSecret == "" {
msgs = append(msgs, "missing setting: client-secret") 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")
}
o.redirectUrl, msgs = parseUrl(o.RedirectUrl, "redirect", msgs) o.redirectUrl, msgs = parseUrl(o.RedirectUrl, "redirect", msgs)