Commit 427f8b61 authored by ale's avatar ale

Check that the domain resource is active

parent f9db6bc1
Pipeline #6373 passed with stages
in 2 minutes and 6 seconds
......@@ -362,7 +362,7 @@ func (v *validationContext) isAllowedEmailDomain() ValidatorFunc {
// Ignore the error in FindResource() since we're going to fail close anyway.
// nolint: errcheck
rsrc, _ := tx.FindResource(rctx.Context, FindResourceRequest{Type: ResourceTypeDomain, Name: value})
if rsrc != nil && rsrc.Website.AcceptMail {
if rsrc != nil && rsrc.Status == ResourceStatusActive && rsrc.Website.AcceptMail {
return nil
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment