diff --git a/auth_admin_passkey_totp_mail_enforce/README.rst b/auth_admin_passkey_totp_mail_enforce/README.rst new file mode 100644 index 0000000000..3bbaa83b5f --- /dev/null +++ b/auth_admin_passkey_totp_mail_enforce/README.rst @@ -0,0 +1,79 @@ +========================================= +Authentification - Disable 2FA if Passkey +========================================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:ed2a833d55c09a0f418a9b32605dacfd3cd3d126136d36943257f903dc050d79 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github + :target: https://github.com/OCA/server-auth/tree/17.0/auth_admin_passkey_totp_mail_enforce + :alt: OCA/server-auth +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-auth-17-0/server-auth-17-0-auth_admin_passkey_totp_mail_enforce + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This is a glue module, needed to allow module auth_admin_passkey working +properly in combination with auth_totp_mail_enforce. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* 360ERP + +Contributors +------------ + +- [360ERP](https://www.360erp.com): + + - Andrea Stirpe + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/server-auth `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/auth_admin_passkey_totp_mail_enforce/__init__.py b/auth_admin_passkey_totp_mail_enforce/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/auth_admin_passkey_totp_mail_enforce/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/auth_admin_passkey_totp_mail_enforce/__manifest__.py b/auth_admin_passkey_totp_mail_enforce/__manifest__.py new file mode 100644 index 0000000000..bedb096082 --- /dev/null +++ b/auth_admin_passkey_totp_mail_enforce/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2024 360ERP () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Authentification - Disable 2FA if Passkey", + "summary": " Disable 2FA if Passkey is being used", + "version": "17.0.1.0.0", + "category": "base", + "author": "360ERP,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/server-auth", + "license": "AGPL-3", + "depends": ["auth_admin_passkey", "auth_totp_mail_enforce"], + "installable": True, + "auto_install": True, +} diff --git a/auth_admin_passkey_totp_mail_enforce/models/__init__.py b/auth_admin_passkey_totp_mail_enforce/models/__init__.py new file mode 100644 index 0000000000..8835165330 --- /dev/null +++ b/auth_admin_passkey_totp_mail_enforce/models/__init__.py @@ -0,0 +1 @@ +from . import res_users diff --git a/auth_admin_passkey_totp_mail_enforce/models/res_users.py b/auth_admin_passkey_totp_mail_enforce/models/res_users.py new file mode 100644 index 0000000000..926d813896 --- /dev/null +++ b/auth_admin_passkey_totp_mail_enforce/models/res_users.py @@ -0,0 +1,17 @@ +# Copyright 2024 360ERP () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models +from odoo.http import request + + +class ResUsers(models.Model): + _inherit = "res.users" + + def _mfa_url(self): + """Needed to ensure that 'ignore_totp' is processed before entering + the _mfa_url() of auth_totp_mail_enforce. + """ + if request.session.get("ignore_totp"): + return None + return super()._mfa_url() diff --git a/auth_admin_passkey_totp_mail_enforce/pyproject.toml b/auth_admin_passkey_totp_mail_enforce/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/auth_admin_passkey_totp_mail_enforce/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/auth_admin_passkey_totp_mail_enforce/readme/CONTRIBUTORS.md b/auth_admin_passkey_totp_mail_enforce/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..e26d195aa1 --- /dev/null +++ b/auth_admin_passkey_totp_mail_enforce/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- [360ERP](https://www.360erp.com): + - Andrea Stirpe diff --git a/auth_admin_passkey_totp_mail_enforce/readme/DESCRIPTION.md b/auth_admin_passkey_totp_mail_enforce/readme/DESCRIPTION.md new file mode 100644 index 0000000000..ca12cabb88 --- /dev/null +++ b/auth_admin_passkey_totp_mail_enforce/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This is a glue module, needed to allow module auth_admin_passkey working +properly in combination with auth_totp_mail_enforce. diff --git a/auth_admin_passkey_totp_mail_enforce/static/description/icon.png b/auth_admin_passkey_totp_mail_enforce/static/description/icon.png new file mode 100644 index 0000000000..490879d9f4 Binary files /dev/null and b/auth_admin_passkey_totp_mail_enforce/static/description/icon.png differ diff --git a/auth_admin_passkey_totp_mail_enforce/static/description/index.html b/auth_admin_passkey_totp_mail_enforce/static/description/index.html new file mode 100644 index 0000000000..b569e78b9d --- /dev/null +++ b/auth_admin_passkey_totp_mail_enforce/static/description/index.html @@ -0,0 +1,425 @@ + + + + + + +Authentification - Disable 2FA if Passkey + + + +
+

Authentification - Disable 2FA if Passkey

+ + +

Beta License: AGPL-3 OCA/server-auth Translate me on Weblate Try me on Runboat

+

This is a glue module, needed to allow module auth_admin_passkey working +properly in combination with auth_totp_mail_enforce.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • 360ERP
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/server-auth project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ +