-
Notifications
You must be signed in to change notification settings - Fork 263
Conversation
@zwass this is ready for review. I'm going to add integration testing and react rendering in another PR to keep reviews manageable. |
@@ -44,15 +44,21 @@ func (vc *ViewerContext) UserID() (uint, error) { | |||
// CanPerformActions returns a bool indicating the current user's ability to | |||
// perform the most basic actions on the site | |||
func (vc *ViewerContext) CanPerformActions() bool { | |||
if vc.user == nil { | |||
return false | |||
if vc.IsLoggedIn() && !vc.user.NeedsPasswordReset { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to see return vc.IsLoggedIn() && !vc.user.NeedsPasswordReset
OK, other than the spam catcher evasion question, the rest of this should be good to go. Moving the email function out even allowed me to use a mock pool object to get another test in. I think I'm using *KolideError properly in I'm going to punt on spam detection avoidance for now and tackle it with DKIM. |
} | ||
|
||
err = GetSMTPConnectionPool(c).Send(&e, time.Second*10) | ||
kerr = SendEmail(GetSMTPConnectionPool(c), user.Email, subject, html, text) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be kerr
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes!
No description provided.