Skip to content

Commit 940cac1

Browse files
committed
Merge tag '11.7.2' into rel
2 parents 558c823 + 2f48c81 commit 940cac1

File tree

98 files changed

+7328
-6217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+7328
-6217
lines changed

CHANGELOG.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
Version 11.7.2
2+
--------------
3+
4+
:Date: September 10, 2024
5+
6+
* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#11590 <https://github.com/readthedocs/readthedocs.org/pull/11590>`__)
7+
* `@agjohnson <https://github.com/agjohnson>`__: Update common (`#11589 <https://github.com/readthedocs/readthedocs.org/pull/11589>`__)
8+
* `@humitos <https://github.com/humitos>`__: Docs: final date for addons and link to blog post (`#11588 <https://github.com/readthedocs/readthedocs.org/pull/11588>`__)
9+
* `@humitos <https://github.com/humitos>`__: Docs: small updates to sitemaps page (`#11585 <https://github.com/readthedocs/readthedocs.org/pull/11585>`__)
10+
* `@stsewd <https://github.com/stsewd>`__: SAML: update docs (`#11583 <https://github.com/readthedocs/readthedocs.org/pull/11583>`__)
11+
* `@stsewd <https://github.com/stsewd>`__: Email: use first recipient from email object (`#11581 <https://github.com/readthedocs/readthedocs.org/pull/11581>`__)
12+
* `@humitos <https://github.com/humitos>`__: Release 11.7.1 (`#11580 <https://github.com/readthedocs/readthedocs.org/pull/11580>`__)
13+
* `@stsewd <https://github.com/stsewd>`__: Admin: set raw field for SSOIntegration (`#11572 <https://github.com/readthedocs/readthedocs.org/pull/11572>`__)
14+
* `@humitos <https://github.com/humitos>`__: Add project: skip config step if YAML file is present (`#11540 <https://github.com/readthedocs/readthedocs.org/pull/11540>`__)
15+
* `@agjohnson <https://github.com/agjohnson>`__: Standardize error template paths (`#11494 <https://github.com/readthedocs/readthedocs.org/pull/11494>`__)
16+
117
Version 11.7.1
218
--------------
319

common

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777
master_doc = "index"
7878
copyright = "Read the Docs, Inc & contributors"
79-
version = "11.7.1"
79+
version = "11.7.2"
8080
release = version
8181
exclude_patterns = ["_build", "shared", "_includes"]
8282
default_role = "obj"

docs/user/addons.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ All projects using ``mkdocs`` :ref:`mkdocs <config-file/v2:mkdocs>` or the ``bui
4040

4141
.. note::
4242

43-
Read the Docs Addons will be enabled by default for all Read the Docs projects some time in the second half of 2024.
43+
Read the Docs Addons will be enabled by default for all Read the Docs projects on October 7th.
44+
Read the full announcement in our `blog post <https://about.readthedocs.com/blog/2024/07/addons-by-default/>`_.
4445

4546
Configuring Read the Docs Addons
4647
--------------------------------

docs/user/guides/set-up-single-sign-on-saml.rst

Lines changed: 56 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Prerequisites
1818

1919
.. include:: /shared/organization-permissions.rst
2020

21-
Create a new SAML application in Okta
22-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21+
Create a SAML application in Okta
22+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2323

2424
In order to enable SSO with Okta, you need to create a new SAML application in your Okta account.
2525

@@ -51,56 +51,79 @@ In order to enable SSO with Okta, you need to create a new SAML application in y
5151
8. Select ``This is an internal app that we have created``.
5252
9. Click :guilabel:`Finish`.
5353

54-
User setup
55-
~~~~~~~~~~
54+
Enable SAML on your Read the Docs organization
55+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5656

57-
Using this setup, all users who have access to the configured Okta application will automatically join to your Read the Docs organization when they sign up.
58-
Existing users will not be automatically joined to the organization.
57+
Once you have created the SAML application in Okta, you need to enable SAML on Read the Docs.
5958

60-
You can still add outside collaborators and manage their access.
61-
There are two ways to manage this access:
62-
63-
* Using :doc:`teams </guides/manage-read-the-docs-teams>` to provide access for ongoing contribution.
64-
* Using :doc:`sharing </commercial/sharing>` to provide short-term access requiring a login.
59+
1. Copy the Metadata URL from the Okta application you just created.
6560

66-
Enabling SSO
67-
------------
61+
* On Okta, click on the :guilabel:`Applications`.
62+
* Click on the Read the Docs application.
63+
* Click on the :guilabel:`Sign On` tab.
64+
* Copy the :guilabel:`Metadata URL`.
6865

69-
Enabling SSO is currently done by the Read the Docs team,
70-
contact :doc:`support </support>` to enable this feature for your organization.
66+
2. Go you your `organization's SAML settings page <https://readthedocs.com/organizations/choose/organization_saml/>`__.
67+
3. Paste the Metadata URL in the :guilabel:`Metadata URL` field.
68+
4. Leave the domain field empty.
69+
5. Click :guilabel:`Save`.
7170

72-
By default, users that sign up with SAML do not have any permissions over any project.
73-
However, you can define which teams users will auto-join when they sign up.
71+
Attaching the email domain your organization uses to enforce SAML is currently done by the Read the Docs team,
72+
contact :doc:`support </support>` using an account that's an owner of the organization.
7473

75-
After enabling the SAML integration,
76-
all users with email addresses from your configured domain will be required to signup using SAML.
74+
Configure a team for users to join automatically
75+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7776

78-
.. warning::
77+
After you have enabled SAML on your organization,
78+
a team named "SAML Users" will be created automatically,
79+
and all users that sign up with SAML will be automatically joined to this team.
80+
You can delete this team, or configure a different team or teams for users to join automatically.
7981

80-
Existing users with email addresses from your configured domain will not be required to sign up using SAML,
81-
but they won't be automatically joined to your organization.
82-
83-
Configure team for all users to join
84-
------------------------------------
85-
86-
You can mark one or more teams that users will automatically join when they sign up with a matching email address.
87-
Configure this option by:
82+
To configure a team for users to join automatically:
8883

8984
1. Navigate to the `teams management page <https://readthedocs.com/organizations/choose/organization_team_list/>`__.
9085
2. Click the :guilabel:`<team name>`.
9186
3. Click :guilabel:`Edit team`
9287
4. Enable *Auto join users with an organization's email address to this team*.
9388
5. Click :guilabel:`Save`
9489

95-
With this enabled,
96-
all users that sign up with SAML will automatically join this team.
97-
These teams can have either *read-only* or *admin* permissions over a set of projects.
90+
User management
91+
---------------
92+
93+
New users
94+
~~~~~~~~~
95+
96+
After enabling the SAML integration,
97+
all users with an email domain matching the one in your SAML integration will be required to sign up using SAML.
98+
After they sign up, they will be automatically joined to your organization within the teams you have configured to auto-join users.
99+
100+
Existing users
101+
~~~~~~~~~~~~~~
102+
103+
Existing users with email addresses from your configured domain will not be required to sign in using SAML,
104+
but they won't be automatically joined to your organization.
105+
106+
If you want to enforce SAML for existing users, you have the following options:
107+
108+
- Users can delete their accounts, and sign up again using SAML.
109+
- Users can link their existing accounts to their SAML identity by following this link while logged in their Read the Docs account:
110+
``https://readthedocs.com/accounts/saml/<organization-slug>/login/?process=connect`` (replace ``<organization-slug>`` with your organization slug).
111+
You can find this link in your `organization's SAML settings page <https://readthedocs.com/organizations/choose/organization_saml/>`__.
112+
113+
Outside collaborators
114+
~~~~~~~~~~~~~~~~~~~~~
115+
116+
You can still add outside collaborators that don't use SAML and manage their access.
117+
There are two ways to manage this access:
118+
119+
* Using :doc:`teams </guides/manage-read-the-docs-teams>` to provide access for ongoing contribution.
120+
* Using :doc:`sharing </commercial/sharing>` to provide short-term access requiring a login.
98121

99122
Revoke user's access to all the projects
100-
----------------------------------------
123+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101124

102125
By disabling access to the SAML integration to a user,
103-
you revoke access to all the projects the linked Read the Docs user had access to,
126+
you revoke access to all the projects their linked Read the Docs user had access to,
104127
and disable login on Read the Docs completely for that user.
105128

106129
.. warning::

docs/user/reference/sitemaps.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
``sitemap.xml`` support
2-
=======================
1+
Sitemap support
2+
===============
33

44
`Sitemaps <https://www.sitemaps.org/>`__ allow you to inform search engines about URLs that are available for crawling.
55
This makes your content more :term:`discoverable <discoverability>`,
@@ -17,10 +17,8 @@ It contains information such as:
1717
* What translations are available for a page.
1818

1919
Read the Docs automatically generates a ``sitemap.xml`` for your project,
20-
21-
By default the sitemap includes:
22-
23-
* Each version of your documentation and when it was last updated, sorted by version number.
20+
by default the sitemap includes each version of your documentation and when it was last updated,
21+
sorted by version number.
2422

2523
This allows search engines to prioritize results based on the version number,
2624
sorted by `semantic versioning`_.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "readthedocs",
3-
"version": "11.7.1",
3+
"version": "11.7.2",
44
"description": "Read the Docs build dependencies",
55
"author": "Read the Docs, Inc <[email protected]>",
66
"scripts": {

readthedocs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Read the Docs."""
22

33

4-
__version__ = "11.7.1"
4+
__version__ = "11.7.2"

readthedocs/core/views/__init__.py

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ class ErrorView(TemplateView):
9393
multiple subpaths for errors, as we need to show application themed errors
9494
for dashboard users and minimal error pages for documentation readers.
9595
96+
Template resolution also uses fallback to generic 4xx/5xx error templates.
97+
9698
View arguments:
9799
98100
status_code
@@ -105,49 +107,38 @@ class ErrorView(TemplateView):
105107
separate path from Proxito error templates.
106108
"""
107109

108-
base_path = "errors/dashboard/"
109-
status_code = 500
110+
base_path = "errors/dashboard"
111+
status_code = None
112+
template_name = None
110113

111114
def get_status_code(self):
112-
status_code = self.status_code
113-
try:
114-
status_code = int(self.kwargs["status_code"])
115-
except (ValueError, KeyError):
116-
pass
117-
return status_code
115+
return self.kwargs.get("status_code", self.status_code)
116+
117+
def get_template_name(self):
118+
return self.kwargs.get("template_name", self.template_name)
118119

119120
def get_template_names(self):
120-
status_code = self.get_status_code()
121-
if settings.RTD_EXT_THEME_ENABLED:
122-
# First try to load the template for the specific HTTP status code
123-
# and fall back to a generic 400/500 level error template
124-
status_code_class = int(status_code / 100)
125-
generic_code = f"{status_code_class}xx"
126-
return [
127-
f"{self.base_path}/{code}.html" for code in [status_code, generic_code]
128-
]
129-
# TODO the legacy dashboard has top level path errors, as is the
130-
# default. This can be removed later.
131-
return f"{status_code}.html"
121+
template_names = []
122+
if (template_name := self.get_template_name()) is not None:
123+
template_names.append(template_name.rstrip("/"))
124+
if (status_code := self.get_status_code()) is not None:
125+
template_names.append(str(status_code))
126+
return [f"{self.base_path}/{file}.html" for file in template_names]
127+
128+
def get_context_data(self, **kwargs):
129+
context_data = super().get_context_data(**kwargs)
130+
context_data["status_code"] = self.get_status_code()
131+
return context_data
132132

133133
def dispatch(self, request, *args, **kwargs):
134-
context = self.get_context_data(**kwargs)
134+
context = self.get_context_data()
135135
status_code = self.get_status_code()
136136
return self.render_to_response(
137137
context,
138138
status=status_code,
139139
)
140140

141141

142-
# TODO replace this with ErrorView and a template in `errors/` instead
143-
class TeapotView(TemplateView):
144-
template_name = "core/teapot.html"
145-
146-
def get(self, request, *args, **kwargs):
147-
context = self.get_context_data(**kwargs)
148-
return self.render_to_response(context, status=418)
149-
150-
151142
class PageNotFoundView(View):
152143

153144
"""Just a 404 view that ignores all URL parameters."""

0 commit comments

Comments
 (0)