-
-
Notifications
You must be signed in to change notification settings - Fork 424
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
[17.0][ADD] new module auth_admin_passkey_totp_mail_enforce #625
[17.0][ADD] new module auth_admin_passkey_totp_mail_enforce #625
Conversation
In the res_users.py file, the `ignore_totp` session variable is now set based on the value of the `auth_admin_passkey_ignore_totp` configuration option. If the option is enabled, the `ignore_totp` session variable is set to True. This ensures that the `_mfa_url` method returns None when `ignore_totp` is True, effectively bypassing the 2FA check.
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.
Functional review
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.
hi. thanks for your contribution !
could you add a test for this new module ?
thanks !
@legalsylvain done, could you check? |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
@legalsylvain Can we maybe merge this? Tests were added. |
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.
Thanks for adding the tests!
Oh @astirpe please check precommit:
|
148f9dc
to
07f503c
Compare
@StefanRijnhart done, thanks! |
This PR has the |
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at b01d341. Thanks a lot for contributing to OCA. ❤️ |
Depends on #624
Context
In #550 (V16) and #624 (V17) there's a proposal for module
auth_admin_passkey
to bypass TOTP/2FA for admin passkey.In case module
auth_totp_mail_enforce
is also installed, the above solution may not work, depending on which module was installed in which order (first or second).Proposal
We hereby propose this glue module, auto-installable in case both
auth_admin_passkey
auth_totp_mail_enforce
are installed.This module ensures that method
_mfa_url()
is executed properly, regardless of which of the modules (auth_admin_passkey
orauth_totp_mail_enforce
) was installed first.