Skip to content

Commit 2cbea88

Browse files
committed
Merge branch 'master' into use-latest-setuptools
2 parents 7c8a373 + 29a9f7e commit 2cbea88

File tree

112 files changed

+2251
-905
lines changed

Some content is hidden

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

112 files changed

+2251
-905
lines changed

.readthedocs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ search:
1515

1616
# Internal documentation
1717
development/design/*: -5
18+
19+
# Useful content, but not something we want most users finding
20+
custom_installs/*: -6

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ addons:
1010
jobs:
1111
include:
1212
- python: 3.6
13-
env: TOXENV=py36,codecov TOX_POSARGS='' ES_VERSION=6.2.4 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
13+
env: TOXENV=py36,codecov TOX_POSARGS='' ES_VERSION=6.5.4 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
1414
- python: 3.6
1515
env: TOXENV=docs
1616
- python: 3.6

CHANGELOG.rst

+133-51
Large diffs are not rendered by default.

dockerfiles/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
3939

4040
WORKDIR /tmp
4141

42-
RUN curl -O https://raw.githubusercontent.com/readthedocs/readthedocs.org/master/requirements/pip.txt
43-
RUN curl -O https://raw.githubusercontent.com/readthedocs/readthedocs.org/master/requirements/docker.txt
42+
COPY requirements/pip.txt pip.txt
43+
COPY requirements/docker.txt docker.txt
4444
RUN pip3 install --no-cache-dir -r docker.txt
4545

4646
# Install readthedocs-ext only if GITHUB_TOKEN is provided

dockerfiles/nginx/proxito.conf

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ server {
6464
add_header X-RTD-Redirect $rtd_redirect always;
6565
set $cache_tag $upstream_http_cache_tag;
6666
add_header Cache-Tag $cache_tag always;
67+
set $referrer_policy $upstream_http_referrer_policy;
68+
add_header Referrer-Policy $referrer_policy always;
6769
}
6870

6971
# Serve 404 pages here

docs/advertising/ad-customization.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ In Sphinx, this is typically done by
3838
adding a new template (under `templates_path`_)
3939
for inclusion in the `HTML sidebar`_ in your ``conf.py``.
4040

41-
.. _HTML sidebar: http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
42-
.. _templates_path: http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-templates_path
41+
.. _HTML sidebar: https://www.sphinx-doc.org/page/usage/configuration.html#confval-html_sidebars
42+
.. _templates_path: https://www.sphinx-doc.org/page/usage/configuration.html#confval-templates_path
4343

4444
.. code-block:: python
4545

docs/advertising/advertising-details.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ Instead, we target based solely upon:
7171
targeting by state or by metro area (DMA specifically).
7272
* We geolocate a user's IP address to a country when a request is made.
7373

74-
Read the Docs uses GeoLite2 data created by `MaxMind <http://maxmind.com>`_.
75-
7674

7775
Where ads are shown
7876
-------------------
@@ -97,6 +95,14 @@ For more details, see the :ref:`Do Not Track section <privacy-policy:Do Not Trac
9795
of our privacy policy.
9896

9997

98+
Ad serving infrastructure
99+
-------------------------
100+
101+
Our `entire ad server <https://github.com/readthedocs/ethical-ad-server>`_ is open source,
102+
so you can inspect how we're doing things.
103+
We believe strongly in open source, and we practice what we preach.
104+
105+
100106
Analytics
101107
---------
102108

docs/advertising/ethical-advertising.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ They should run before your content,
7474
they should take over the page,
7575
the bigger, weirder, or flashier the better.
7676

77+
.. _fake ad clicks: https://en.wikipedia.org/wiki/Click_fraud
78+
.. _massive downsides: http://idlewords.com/talks/what_happens_next_will_amaze_you.htm
79+
7780
We opt out
7881
~~~~~~~~~~
7982

@@ -91,8 +94,6 @@ The ads won't flash or move.
9194
We run the ads we want to have on our site,
9295
in a way that makes us feel good.
9396

94-
.. _fake ad clicks: https://en.wikipedia.org/wiki/Click_fraud
95-
9697
Additional details
9798
------------------
9899

@@ -105,6 +106,8 @@ Additional details
105106
* Eric Holscher, one of our co-founders
106107
`talks a bit more <https://www.ericholscher.com/blog/2016/aug/31/funding-oss-marketing-money/>`_
107108
about funding open source this way on his blog.
109+
* After proving our ad model as a way to fund open source and building our ad serving infrastructure,
110+
we launched the `EthicalAds network <https://www.ethicalads.io>`_ to help other projects be sustainable.
108111

109112
.. _advertising FAQ: https://readthedocs.org/sustainability/advertising/faq/
110113

@@ -120,8 +123,6 @@ We hope that others will join us in this mission:
120123
vote with your dollars and support us in building the ad model we want to exist.
121124
`Get more information <https://readthedocs.org/sustainability/advertising/>`_ on what we offer.
122125

123-
.. _massive downsides: http://idlewords.com/talks/what_happens_next_will_amaze_you.htm
124-
125126

126127
Community Ads
127128
-------------

docs/api/v3.rst

+5
Original file line numberDiff line numberDiff line change
@@ -1364,3 +1364,8 @@ Environment Variable delete
13641364
:requestheader Authorization: token to authenticate.
13651365

13661366
:statuscode 204: Environment variable deleted successfully
1367+
1368+
Additional APIs
1369+
---------------
1370+
1371+
- :ref:`Server side search API <server-side-search:api>`.

docs/changelog.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ Code Notes
2424
- Updated Django from `1.6.11` to `1.8.3`.
2525
- Removed South and ported the South migrations to Django's migration framework.
2626
- Updated django-celery from `3.0.23` to `3.1.26` as django-celery 3.0.x does not support Django 1.8.
27-
- Updated Celery from `3.0.24` to `3.1.18` because we had to update django-celery. We need to test this extensively and might need to think about using the new Celery API directly and dropping django-celery. See release notes: http://docs.celeryproject.org/en/latest/whatsnew-3.1.html
27+
- Updated Celery from `3.0.24` to `3.1.18` because we had to update django-celery. We need to test this extensively and might need to think about using the new Celery API directly and dropping django-celery.
28+
See release notes: https://docs.celeryproject.org/en/3.1/whatsnew-3.1.html
2829
- Updated tastypie from `0.11.1` to current master (commit `1e1aff3dd4dcd21669e9c68bd7681253b286b856`) as 0.11.x is not compatible with Django 1.8. No surprises expected but we should ask for a proper release, see release notes: https://github.com/django-tastypie/django-tastypie/blob/master/docs/release_notes/v0.12.0.rst
29-
- Updated django-oauth from `0.16.1` to `0.21.0`. No surprises expected, see release notes `in the docs <https://django-allauth.readthedocs.org/en/latest/changelog.html>`_ and `finer grained in the repo <https://github.com/pennersr/django-allauth/blob/9123223f167959e4e5c4074408db068f725559d1/ChangeLog#L1-169>`_
30+
- Updated django-oauth from `0.16.1` to `0.21.0`. No surprises expected, see release notes `in the docs <https://django-allauth.readthedocs.io/en/latest/release-notes.html>`_ and `finer grained in the repo <https://github.com/pennersr/django-allauth/blob/9123223f167959e4e5c4074408db068f725559d1/ChangeLog#L1-169>`_
3031
- Updated django-guardian from `1.2.0` to `1.3.0` to gain Django 1.8 support. No surprises expected, see release notes: https://github.com/lukaszb/django-guardian/blob/devel/CHANGES
3132
- Using `django-formtools` instead of removed `django.contrib.formtools` now. Based on the Django release notes, these modules are the same except of the package name.
32-
- Updated pytest-django from `2.6.2` to `2.8.0`. No tests required, but running the testsuite :smile:
33+
- Updated pytest-django from `2.6.2` to `2.8.0`. No tests required, but running the testsuite :smile:
3334
- Updated psycopg2 from 2.4 to 2.4.6 as 2.4.5 is required by Django 1.8. No trouble expected as Django is the layer between us and psycopg2. Also it's only a minor version upgrade. Release notes: http://initd.org/psycopg/docs/news.html#what-s-new-in-psycopg-2-4-6
3435
- Added `django.setup()` to `conf.py` to load django properly for doc builds.
3536
- Added migrations for all apps with models in the `readthedocs/` directory

docs/commercial/index.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ Advertising-free
2929
.. _readthedocs.org: https://readthedocs.org
3030
.. _readthedocs.com: https://readthedocs.com
3131

32-
.. toctree::
32+
.. toctree::
3333
:caption: Additional commercial features
3434

3535
organizations
36+
single-sign-on
3637
sharing
3738
analytics

docs/commercial/organizations.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ The best way to think about this relationship is:
2222

2323
*Owners* will create *Teams* to assign permissions to all *Members*.
2424

25+
.. warning::
26+
27+
Owners, Members and Teams behave differently if you are using
28+
:ref:`SSO with VCS provider (GitHub, Bitbucket or GitLab) <commercial/single-sign-on:SSO with VCS provider (GitHub, Bitbucket or GitLab)>`
29+
2530
Team Types
2631
~~~~~~~~~~
2732

@@ -44,4 +49,3 @@ Roadrunner would set up a *Team* called *Contractors*.
4449
That team would have *Read Only* access to the *Road Builder* project.
4550
Then he would add *Wile E. Coyote* to the team.
4651
This would give him access to just this one project inside the organization.
47-

docs/commercial/single-sign-on.rst

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
Single Sign-On
2+
==============
3+
4+
.. note::
5+
6+
This feature only exists on `Read the Docs for Business <https://readthedocs.com/>`__.
7+
8+
9+
Single Sign-On is supported on |com_brand| for Pro and Enterprise plans.
10+
:abbr:`SSO (Single Sign-On)` will allow you to grant permissions to your organization's projects in an easy way.
11+
12+
Currently, we support two different types of Single Sign-On:
13+
14+
* Authentication *and* authorization are managed by the Identity Provider (e.g. GitHub, Bitbucket or GitLab)
15+
* Authentication (*only*) is managed by the Identity Provider (e.g. an active GSuite/Google ``@company.com`` with a verified email address)
16+
17+
.. note::
18+
19+
SSO is currently in **Beta** and only GitHub, Bitbucket, GitLab and Google are supported for now.
20+
If you would like to apply for the Beta, please `contact us <mailto:[email protected]>`_.
21+
22+
.. contents::
23+
:local:
24+
:depth: 2
25+
26+
27+
SSO with VCS provider (GitHub, Bitbucket or GitLab)
28+
---------------------------------------------------
29+
30+
Using an Identity Provider that supports authentication and authorization allows you to manage
31+
"who have access to what projects on Read the Docs" directly from the provider itself.
32+
In case you want a user to have access to your documentation project under Read the Docs,
33+
that user just needs to be granted permissions in the VCS repository associated with it.
34+
35+
Note the users created under Read the Docs must have their GitHub, Bitbucket or GitLab
36+
:doc:`account connected </connected-accounts>` in order to make SSO to work.
37+
38+
.. note::
39+
40+
You can read more about `granting permissions on GitHub`_.
41+
42+
.. _granting permissions on GitHub: https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization
43+
44+
45+
Grant access to read the documentation
46+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47+
48+
By granting **read** (or more) permissions to a user in the VCS repository
49+
you are giving access to read the documentation of the associated project on Read the Docs to that user.
50+
51+
52+
Grant access to administrate a project
53+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+
55+
By granting **write** permission to a user in the VCS repository
56+
you are giving access to read the documentation *and* to be an administrator
57+
of the associated project on Read the Docs to that user.
58+
59+
60+
Grant access to import a project
61+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62+
63+
When SSO with VCS provider is enabled only owners of the Read the Docs organization can import projects.
64+
Adding users as owners of your organization will give them permissions to import projects.
65+
66+
Note that to be able to import a project, that user must have **admin** permissions in the VCS repository associated.
67+
68+
69+
Revoke access to a project
70+
~~~~~~~~~~~~~~~~~~~~~~~~~~
71+
72+
If a user should not have access anymore to a project for any reason,
73+
a VCS repository's admin (e.g. user with Admin role on GitHub for that specific repository)
74+
can revoke access to the VCS repository and this will be automatically reflected in Read the Docs.
75+
76+
The same process is followed in case you need to remove **admin** access,
77+
but still want that user to have access to read the documentation.
78+
Instead of revoking access completely, just need lower down permissions to **read** only.
79+
80+
81+
SSO with GSuite (Google email account)
82+
--------------------------------------
83+
84+
Using your company's Google email address (e.g. ``[email protected]``) allows you to
85+
manage authentication for your organization's members.
86+
As this Identity Provider does not provide authorization over each repositories/projects per user,
87+
permissions are managed by the :ref:`internal Read the Docs's Teams <commercial/organizations:Team Types>` authorization system.
88+
89+
By default, users that Sign Up with a Google account do not have any permissions over any project.
90+
However, you can define which Teams users matching your company's domain email address will auto-join when they Sign Up.
91+
Read the following sections to learn how to grant read and admin access.
92+
93+
94+
Grant access to read a project
95+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96+
97+
You can add a user under a "Read Only Team" to grant **read** permissions to all the projects under that Team.
98+
This can be done under "your organization detail's page" > :guilabel:`Teams` > :guilabel:`Read Only` > :guilabel:`Invite Member`.
99+
100+
To avoid this repetitive task for each employee of your company,
101+
the owner of the Read the Docs organization can mark one or many Teams for users matching the company's domain email
102+
to join these Teams automaically when they Sign Up.
103+
104+
For example, you can create a "General Documentaion (Read Only)" team
105+
with the projects that all employees of your company should have access to
106+
and mark it as :guilabel:`Auto join users with an organization's email address to this team`.
107+
Then all users that Sign Up with their ``[email protected]`` email will automatically join this Team and have **read** access to those projects.
108+
109+
110+
Grant access to administer a project
111+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112+
113+
You can add a user under an "Admin Team" to grant **admin** permissions to all the projects under that Team.
114+
This can be done under "your organization detail's page" > :guilabel:`Teams` > :guilabel:`Admins` > :guilabel:`Invite Member`.
115+
116+
117+
Grant access to users to import a project
118+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119+
120+
Making the user member of any "Admin Team" under your organization (as mentioned in the previous section),
121+
they will be granted access to import a project.
122+
123+
Note that to be able to import a project, that user must have **admin** permissions in the GitHub, Bitbucket or GitLab repository associated,
124+
and their social account connected with Read the Docs.
125+
126+
127+
Revoke user's access to a project
128+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
129+
130+
To revoke access to a project for a particular user, you should remove that user from the Team that contains that Project.
131+
This can be done under "your organization detail's page" > :guilabel:`Teams` > :guilabel:`Read Only` and click :guilabel:`Remove` next to the user you want to revoke access.
132+
133+
134+
Revoke user's access to all the projects
135+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
136+
137+
By disabling the GSuite/Google account with email ``[email protected]``,
138+
you revoke access to all the projects that user had access and disable login on Read the Docs completely for that user.

docs/conf.py

+5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ def get_version():
110110
# Activate autosectionlabel plugin
111111
autosectionlabel_prefix_document = True
112112

113+
numfig = True
114+
113115
# sphinx-notfound-page
114116
# https://github.com/readthedocs/sphinx-notfound-page
115117
notfound_context = {
@@ -125,6 +127,7 @@ def get_version():
125127
linkcheck_ignore = [
126128
r'http://127\.0\.0\.1',
127129
r'http://localhost',
130+
r'http://community\.dev\.readthedocs\.io',
128131
r'https://yourproject\.readthedocs\.io',
129132
r'https?://docs\.example\.com',
130133
r'https://foo\.readthedocs\.io/projects',
@@ -133,6 +136,8 @@ def get_version():
133136
r'https://github\.com/readthedocs/readthedocs\.org/pull',
134137
r'https://docs\.readthedocs\.io/\?rtd_search',
135138
r'https://readthedocs\.org/search',
139+
# This page is under login
140+
r'https://readthedocs\.org/accounts/gold',
136141
]
137142

138143

docs/config-file/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The main advantages of using a configuration file over the web interface are:
1818
- Some settings are only available using a configuration file
1919

2020
.. tip::
21-
21+
2222
Using a configuration file is the recommended way of using Read the Docs.
2323

2424
.. toctree::

0 commit comments

Comments
 (0)