OpenOversight icon indicating copy to clipboard operation
OpenOversight copied to clipboard

Confirmation email not sent on new user approval

Open dismantl opened this issue 2 years ago • 1 comments

When registration approval is turned on and a new user registers, the admin must go to the user's account and check the "Approved" box. The expected behavior would be that then a confirmation email would be sent to the user after they are approved, but since PR #873 was merged this login was removed. Instead, no email is sent to notify the user that they have been approved and that they need to confirm their account.

dismantl avatar Jun 02 '22 14:06 dismantl

I think we fixed this same issue in our fork fyi: https://github.com/OrcaCollective/OpenOversight/pull/103

sea-kelp avatar Aug 30 '22 06:08 sea-kelp

Seeing that https://github.com/OrcaCollective/OpenOversight/pull/103 was merged in #908. I tested this locally with APPROVE_REGISTRATIONS = true and confirmed that the simulated confirmation email was sent automatically upon approval:

web_1       | [2023-08-03 23:34:14,833] INFO in email_client: simulated email:                                                                                                         
web_1       | [OpenOversight] Confirm Your Account                                                                                                                                     
web_1       | <p>Dear testtest,</p>                                                                                                                                                    
web_1       | <p>                                                                                                                                                                      web_1       |   Welcome to <b>OpenOversight</b>!                                                                                                                                       web_1       | </p>                                                                                                                                                                     
web_1       | <p>                                                                                                                                                                      
web_1       |   To confirm your account please <a href="http://localhost:3000/auth/confirm/eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJjb25maXJtIjo3LCJpYXQiOjE2OTExMDU2NTQsImV4cCI6MTY5MTE
wOTI1NH0.dlIhux4Rb9yG0IqmCWiYRUwfwdneoOfHTw9U0KrYAQOEJA8dDSrjouoSMlFv0gR8HvxbalpudXriZK4XJWIRjg">click here</a>.                                                                       
web_1       | </p>                                                                                                                                                                     
web_1       | <p>Alternatively, you can paste the following link in your browser's address bar:</p>                                                                                    
web_1       | <p>http://localhost:3000/auth/confirm/eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJjb25maXJtIjo3LCJpYXQiOjE2OTExMDU2NTQsImV4cCI6MTY5MTEwOTI1NH0.dlIhux4Rb9yG0IqmCWiYRUwfwdneoO
fHTw9U0KrYAQOEJA8dDSrjouoSMlFv0gR8HvxbalpudXriZK4XJWIRjg</p>                                                                                                                           
web_1       | <p>Sincerely,</p>                                                                                                                                                        
web_1       | <p>The OpenOversight Team</p>                                                                                                                                            
web_1       | <p>                                                                                                                                                                      
web_1       |   <small>Please note that we may not monitor replies to this email address.</small>                                                                                      web_1       | </p>                                                        

0

sea-kelp avatar Aug 03 '23 23:08 sea-kelp

Hey @sea-kelp, based on my understanding we are wanting the email requesting an administrator to approve the new user. The email will contain the string A new user has registered with the following information: and is titled new_registration.html in the code base.

michplunkett avatar Aug 06 '23 23:08 michplunkett

@michplunkett I'm seeing this email after I register a new user when I have APPROVE_REGISTRATIONS=true, is this what you're referring to?

web_1       | [2023-08-07 08:17:26,326] INFO in email_client: simulated email:
web_1       | [OpenOversight] New User Registered                                   
web_1       | <p>Dear test_admin,</p>                                                                                                                                                  
web_1       | <p>A new user has registered with the following information:</p>                                                                                                         
web_1       | <ul>                                                                                                                                                                     
web_1       |   <li>Username: testtest3</li>                                                                                                                                           
web_1       |   <li>Email: [email protected]</li>                                                                                                                                      
web_1       | </ul>                                                                                                                                                                    
web_1       | <p>                                                                                                                                                                      
web_1       |   To approve or delete this user, please <a href="http://localhost:3000/auth/users/8">click here</a>.
web_1       | </p>                           
web_1       | <p>Alternatively, you can paste the following link in your browser's address bar:</p>
web_1       | <p>http://localhost:3000/auth/users/8</p>
web_1       | <p>Sincerely,</p>
web_1       | <p>The OpenOversight Team</p>
web_1       | <p>                            
web_1       |   <small>Please note that we may not monitor replies to this email address.</small>
web_1       | </p>

sea-kelp avatar Aug 07 '23 08:08 sea-kelp

That's it! This is on the develop branch, right? If so, feel free to close the issue!

michplunkett avatar Aug 07 '23 16:08 michplunkett

Yup, double-checked that this is on the develop branch! I don't think I have sufficient permissions to close out this issue

sea-kelp avatar Aug 07 '23 17:08 sea-kelp

I gotchu!

michplunkett avatar Aug 07 '23 17:08 michplunkett