Skip to content

Commit

Permalink
Don't send admin notification to self-service Bootstrap OTP user.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgooch committed Jun 12, 2020
1 parent fe3b1d2 commit 78975d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/keymasterd/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ func (state *RuntimeState) sendBootstrapOtpEmail(hash []byte, OTP string,
}
copy(emailData.Fingerprint[:], hash[:4])
adminUsers := make(map[string]struct{})
adminUsers[initiatorUser] = struct{}{}
if initiatorUser != targetUser {
adminUsers[initiatorUser] = struct{}{}
}
for _, user := range state.Config.Base.AdminUsers {
adminUsers[user] = struct{}{}
}
Expand Down

0 comments on commit 78975d7

Please sign in to comment.