-
Notifications
You must be signed in to change notification settings - Fork 30.1k
[IMP] auth_signup: do not spam the user on new connection #193181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMP] auth_signup: do not spam the user on new connection #193181
Conversation
8c7f9f1 to
22595bf
Compare
a2ce264 to
add1e9e
Compare
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.
Looks pretty clean as far as this is doable.
Would maybe add a test case around the test you updated to cover this feature if it's not too finicky to set up
Sadly I don't think we can avoid some kind of hacky global storage :/
9936b7b to
218c65b
Compare
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.
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.
Indeed, too bad we don't have a warning regardless of TOTP to be honest
Linting comment and one for the session key again
Greening for testing already
addons/auth_totp_mail/tests/test_notify_security_update_totp.py
Outdated
Show resolved
Hide resolved
218c65b to
f1585e5
Compare
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.
@reth-odoo Good idea for the pop :) Done :)
97dd66d to
06748d0
Compare
9a25a41 to
f1dceb6
Compare
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.
addons/auth_totp_mail/tests/test_notify_security_update_totp.py
Outdated
Show resolved
Hide resolved
5cf1e98 to
228f30d
Compare
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.
addons/auth_totp_mail/tests/test_notify_security_update_totp.py
Outdated
Show resolved
Hide resolved
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.
LGTM, just one extra cleaning comment 🧦
228f30d to
ee3914c
Compare
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.
@awa-odoo Change done :)
I like CROM better, we should rename all CRONs to CROMs ! |
ee3914c to
c1c3714
Compare
|
@awa-odoo Good catch 😅 |
Purpose ======= When a user has TOTP enabled, on its first login, he receives 2 emails - "New Connection" email, sent when he enters his credentials - "Trusted Device Added", if he checked "Don't ask again on this device" Because the user needs to login to add a device, and that he will receive the "New Connection" email anyway, we don't notify when adding a new device. We merge the information (like location, etc) in the "New Connection" email template, and we also make all notification emails consistent (same template, same information). Make the "Ask Password" and "TOTP settings" dialog a bit smaller. For all security notification, send right away the notification (instead of waiting for the CRON to run). Task-4070794
c1c3714 to
ba167b1
Compare
|
@robodoo r+ |
Purpose ======= When a user has TOTP enabled, on its first login, he receives 2 emails - "New Connection" email, sent when he enters his credentials - "Trusted Device Added", if he checked "Don't ask again on this device" Because the user needs to login to add a device, and that he will receive the "New Connection" email anyway, we don't notify when adding a new device. We merge the information (like location, etc) in the "New Connection" email template, and we also make all notification emails consistent (same template, same information). Make the "Ask Password" and "TOTP settings" dialog a bit smaller. For all security notification, send right away the notification (instead of waiting for the CRON to run). Task-4070794 closes #193181 Related: odoo/upgrade#7077 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>


Purpose
When a user has TOTP enabled, on its first login, he receives 2 emails
Because the user needs to login to add a device, and that he will receive the
"New Connection" email anyway, we don't notify when adding a new device.
We merge the information (like location, etc) in the "New Connection" email
template, and we also make all notification emails consistent (same template, same
information).
Task-4070794