From 698d53dbc19ba30dbe5ea7ea8eec0defe69d69ba Mon Sep 17 00:00:00 2001
From: Lorena
Date: Tue, 4 Jun 2024 13:29:10 +0200
Subject: [PATCH] [IMP] auth_oauth_autologin: pre-commit auto fixes
---
auth_oauth_autologin/README.rst | 60 ++++++++++---------
auth_oauth_autologin/pyproject.toml | 3 +
auth_oauth_autologin/readme/CONFIGURE.md | 20 +++++++
auth_oauth_autologin/readme/CONFIGURE.rst | 19 ------
auth_oauth_autologin/readme/DESCRIPTION.md | 4 ++
auth_oauth_autologin/readme/DESCRIPTION.rst | 3 -
auth_oauth_autologin/readme/USAGE.md | 3 +
auth_oauth_autologin/readme/USAGE.rst | 3 -
.../static/description/index.html | 60 ++++++++++---------
9 files changed, 93 insertions(+), 82 deletions(-)
create mode 100644 auth_oauth_autologin/pyproject.toml
create mode 100644 auth_oauth_autologin/readme/CONFIGURE.md
delete mode 100644 auth_oauth_autologin/readme/CONFIGURE.rst
create mode 100644 auth_oauth_autologin/readme/DESCRIPTION.md
delete mode 100644 auth_oauth_autologin/readme/DESCRIPTION.rst
create mode 100644 auth_oauth_autologin/readme/USAGE.md
delete mode 100644 auth_oauth_autologin/readme/USAGE.rst
diff --git a/auth_oauth_autologin/README.rst b/auth_oauth_autologin/README.rst
index 027b48ad65..d0dcddca43 100644
--- a/auth_oauth_autologin/README.rst
+++ b/auth_oauth_autologin/README.rst
@@ -17,20 +17,21 @@ Auth Oauth Autologin
: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/16.0/auth_oauth_autologin
+ :target: https://github.com/OCA/server-auth/tree/17.0/auth_oauth_autologin
: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-16-0/server-auth-16-0-auth_oauth_autologin
+ :target: https://translation.odoo-community.org/projects/server-auth-17-0/server-auth-17-0-auth_oauth_autologin
: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=16.0
+ :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 modules implements an automatic redirection to the configured OAuth
-provider login page, if there is one and only one enabled. This effectively
-makes the regular Odoo login screen invisible in normal circumstances.
+provider login page, if there is one and only one enabled. This
+effectively makes the regular Odoo login screen invisible in normal
+circumstances.
**Table of contents**
@@ -40,32 +41,33 @@ makes the regular Odoo login screen invisible in normal circumstances.
Configuration
=============
-Configure OAuth providers in Settings > Users and Companies, and make sure
-there is one and only one that has both the enabled and automatic login flags
-set.
+Configure OAuth providers in Settings > Users and Companies, and make
+sure there is one and only one that has both the enabled and automatic
+login flags set.
When this is done, users visiting the login page (/web/login), or being
-redirected to it because they are not authenticated yet, will be redirected to
-the identity provider login page instead of the regular Odoo login page.
-
-Be aware that this module does not actively prevent users from authenticating
-with an login and password stored in the Odoo database. In some unusual
-circumstances (such as identity provider errors), the regular Odoo login may
-still be displayed. Securely disabling Odoo login and password, if needed,
-should be the topic of another module.
-
-Also be aware that this has a possibly surprising effect on the logout menu
-item. When the user logs out of Odoo, a redirect to the login page happens. The
-login page in turn redirects to the identity provider, which, if the user is
-already authenticated there, automatically logs the user back in Odoo, in a
-fresh session.
+redirected to it because they are not authenticated yet, will be
+redirected to the identity provider login page instead of the regular
+Odoo login page.
+
+Be aware that this module does not actively prevent users from
+authenticating with an login and password stored in the Odoo database.
+In some unusual circumstances (such as identity provider errors), the
+regular Odoo login may still be displayed. Securely disabling Odoo login
+and password, if needed, should be the topic of another module.
+
+Also be aware that this has a possibly surprising effect on the logout
+menu item. When the user logs out of Odoo, a redirect to the login page
+happens. The login page in turn redirects to the identity provider,
+which, if the user is already authenticated there, automatically logs
+the user back in Odoo, in a fresh session.
Usage
=====
-When configured, the Odoo login page redirects to the OAuth identify provider
-for authentication and login in Odoo. To access the regular Odoo login page,
-visit ``/web/login?no_autologin``.
+When configured, the Odoo login page redirects to the OAuth identify
+provider for authentication and login in Odoo. To access the regular
+Odoo login page, visit ``/web/login?no_autologin``.
Bug Tracker
===========
@@ -73,7 +75,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -81,12 +83,12 @@ Credits
=======
Authors
-~~~~~~~
+-------
* ACSONE SA/NV
Maintainers
-~~~~~~~~~~~
+-----------
This module is maintained by the OCA.
@@ -106,6 +108,6 @@ Current `maintainer `__:
|maintainer-sbidoul|
-This module is part of the `OCA/server-auth `_ project on GitHub.
+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_oauth_autologin/pyproject.toml b/auth_oauth_autologin/pyproject.toml
new file mode 100644
index 0000000000..4231d0cccb
--- /dev/null
+++ b/auth_oauth_autologin/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["whool"]
+build-backend = "whool.buildapi"
diff --git a/auth_oauth_autologin/readme/CONFIGURE.md b/auth_oauth_autologin/readme/CONFIGURE.md
new file mode 100644
index 0000000000..7a720b57dc
--- /dev/null
+++ b/auth_oauth_autologin/readme/CONFIGURE.md
@@ -0,0 +1,20 @@
+Configure OAuth providers in Settings \> Users and Companies, and make
+sure there is one and only one that has both the enabled and automatic
+login flags set.
+
+When this is done, users visiting the login page (/web/login), or being
+redirected to it because they are not authenticated yet, will be
+redirected to the identity provider login page instead of the regular
+Odoo login page.
+
+Be aware that this module does not actively prevent users from
+authenticating with an login and password stored in the Odoo database.
+In some unusual circumstances (such as identity provider errors), the
+regular Odoo login may still be displayed. Securely disabling Odoo login
+and password, if needed, should be the topic of another module.
+
+Also be aware that this has a possibly surprising effect on the logout
+menu item. When the user logs out of Odoo, a redirect to the login page
+happens. The login page in turn redirects to the identity provider,
+which, if the user is already authenticated there, automatically logs
+the user back in Odoo, in a fresh session.
diff --git a/auth_oauth_autologin/readme/CONFIGURE.rst b/auth_oauth_autologin/readme/CONFIGURE.rst
deleted file mode 100644
index 99464d82ba..0000000000
--- a/auth_oauth_autologin/readme/CONFIGURE.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-Configure OAuth providers in Settings > Users and Companies, and make sure
-there is one and only one that has both the enabled and automatic login flags
-set.
-
-When this is done, users visiting the login page (/web/login), or being
-redirected to it because they are not authenticated yet, will be redirected to
-the identity provider login page instead of the regular Odoo login page.
-
-Be aware that this module does not actively prevent users from authenticating
-with an login and password stored in the Odoo database. In some unusual
-circumstances (such as identity provider errors), the regular Odoo login may
-still be displayed. Securely disabling Odoo login and password, if needed,
-should be the topic of another module.
-
-Also be aware that this has a possibly surprising effect on the logout menu
-item. When the user logs out of Odoo, a redirect to the login page happens. The
-login page in turn redirects to the identity provider, which, if the user is
-already authenticated there, automatically logs the user back in Odoo, in a
-fresh session.
diff --git a/auth_oauth_autologin/readme/DESCRIPTION.md b/auth_oauth_autologin/readme/DESCRIPTION.md
new file mode 100644
index 0000000000..415e3f901e
--- /dev/null
+++ b/auth_oauth_autologin/readme/DESCRIPTION.md
@@ -0,0 +1,4 @@
+This modules implements an automatic redirection to the configured OAuth
+provider login page, if there is one and only one enabled. This
+effectively makes the regular Odoo login screen invisible in normal
+circumstances.
diff --git a/auth_oauth_autologin/readme/DESCRIPTION.rst b/auth_oauth_autologin/readme/DESCRIPTION.rst
deleted file mode 100644
index 24021db9af..0000000000
--- a/auth_oauth_autologin/readme/DESCRIPTION.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-This modules implements an automatic redirection to the configured OAuth
-provider login page, if there is one and only one enabled. This effectively
-makes the regular Odoo login screen invisible in normal circumstances.
diff --git a/auth_oauth_autologin/readme/USAGE.md b/auth_oauth_autologin/readme/USAGE.md
new file mode 100644
index 0000000000..06f26e76c8
--- /dev/null
+++ b/auth_oauth_autologin/readme/USAGE.md
@@ -0,0 +1,3 @@
+When configured, the Odoo login page redirects to the OAuth identify
+provider for authentication and login in Odoo. To access the regular
+Odoo login page, visit `/web/login?no_autologin`.
diff --git a/auth_oauth_autologin/readme/USAGE.rst b/auth_oauth_autologin/readme/USAGE.rst
deleted file mode 100644
index d2cf4360b6..0000000000
--- a/auth_oauth_autologin/readme/USAGE.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-When configured, the Odoo login page redirects to the OAuth identify provider
-for authentication and login in Odoo. To access the regular Odoo login page,
-visit ``/web/login?no_autologin``.
diff --git a/auth_oauth_autologin/static/description/index.html b/auth_oauth_autologin/static/description/index.html
index 343b7b94bd..d93b8f2e7c 100644
--- a/auth_oauth_autologin/static/description/index.html
+++ b/auth_oauth_autologin/static/description/index.html
@@ -1,4 +1,3 @@
-
@@ -9,10 +8,11 @@
/*
:Author: David Goodger (goodger@python.org)
-:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
+:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
+Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
@@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }
-pre.code .ln { color: grey; } /* line numbers */
+pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@
span.pre {
white-space: pre }
-span.problematic {
+span.problematic, pre.problematic {
color: red }
span.section-subtitle {
@@ -369,10 +369,11 @@ Auth Oauth Autologin
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b39eab35ecf9f611b79515461079fc6ba8a002fc432515c31009b6c70eff01c3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This modules implements an automatic redirection to the configured OAuth
-provider login page, if there is one and only one enabled. This effectively
-makes the regular Odoo login screen invisible in normal circumstances.
+provider login page, if there is one and only one enabled. This
+effectively makes the regular Odoo login screen invisible in normal
+circumstances.
Table of contents
@@ -388,35 +389,36 @@ Auth Oauth Autologin
-
Configure OAuth providers in Settings > Users and Companies, and make sure
-there is one and only one that has both the enabled and automatic login flags
-set.
+
Configure OAuth providers in Settings > Users and Companies, and make
+sure there is one and only one that has both the enabled and automatic
+login flags set.
When this is done, users visiting the login page (/web/login), or being
-redirected to it because they are not authenticated yet, will be redirected to
-the identity provider login page instead of the regular Odoo login page.
-
Be aware that this module does not actively prevent users from authenticating
-with an login and password stored in the Odoo database. In some unusual
-circumstances (such as identity provider errors), the regular Odoo login may
-still be displayed. Securely disabling Odoo login and password, if needed,
-should be the topic of another module.
-
Also be aware that this has a possibly surprising effect on the logout menu
-item. When the user logs out of Odoo, a redirect to the login page happens. The
-login page in turn redirects to the identity provider, which, if the user is
-already authenticated there, automatically logs the user back in Odoo, in a
-fresh session.
+redirected to it because they are not authenticated yet, will be
+redirected to the identity provider login page instead of the regular
+Odoo login page.
+
Be aware that this module does not actively prevent users from
+authenticating with an login and password stored in the Odoo database.
+In some unusual circumstances (such as identity provider errors), the
+regular Odoo login may still be displayed. Securely disabling Odoo login
+and password, if needed, should be the topic of another module.
+
Also be aware that this has a possibly surprising effect on the logout
+menu item. When the user logs out of Odoo, a redirect to the login page
+happens. The login page in turn redirects to the identity provider,
+which, if the user is already authenticated there, automatically logs
+the user back in Odoo, in a fresh session.
-
When configured, the Odoo login page redirects to the OAuth identify provider
-for authentication and login in Odoo. To access the regular Odoo login page,
-visit /web/login?no_autologin.
+
When configured, the Odoo login page redirects to the OAuth identify
+provider for authentication and login in Odoo. To access the regular
+Odoo login page, visit /web/login?no_autologin.
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.
+
feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -430,13 +432,15 @@
This module is maintained by the OCA.
-
+
+
+
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.
Current maintainer:
-
This module is part of the OCA/server-auth project on GitHub.
+
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.