Skip to content

Commit 5e1e501

Browse files
committed
Merge branch 'master' into refactor-views-project-versions
2 parents d9ab73f + a42f5d4 commit 5e1e501

File tree

21 files changed

+288
-339
lines changed

21 files changed

+288
-339
lines changed

CHANGELOG.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
Version 3.7.5
2+
-------------
3+
4+
:Date: September 26, 2019
5+
6+
* `@davidfischer <http://github.com/davidfischer>`__: Remove if storage blocks (`#6191 <https://github.com/readthedocs/readthedocs.org/pull/6191>`__)
7+
* `@davidfischer <http://github.com/davidfischer>`__: Update security docs (`#6179 <https://github.com/readthedocs/readthedocs.org/pull/6179>`__)
8+
* `@davidfischer <http://github.com/davidfischer>`__: Add the private spamfighting module to INSTALLED_APPS (`#6177 <https://github.com/readthedocs/readthedocs.org/pull/6177>`__)
9+
* `@davidfischer <http://github.com/davidfischer>`__: Document connected account permissions (`#6172 <https://github.com/readthedocs/readthedocs.org/pull/6172>`__)
10+
* `@stsewd <http://github.com/stsewd>`__: Require login for old redirect (`#6170 <https://github.com/readthedocs/readthedocs.org/pull/6170>`__)
11+
* `@humitos <http://github.com/humitos>`__: Remove old and unused code (`#6167 <https://github.com/readthedocs/readthedocs.org/pull/6167>`__)
12+
* `@stsewd <http://github.com/stsewd>`__: Clean up views (`#6166 <https://github.com/readthedocs/readthedocs.org/pull/6166>`__)
13+
* `@stsewd <http://github.com/stsewd>`__: Update docs for sharing (`#6164 <https://github.com/readthedocs/readthedocs.org/pull/6164>`__)
14+
* `@pyup-bot <http://github.com/pyup-bot>`__: pyup: Scheduled weekly dependency update for week 36 (`#6158 <https://github.com/readthedocs/readthedocs.org/pull/6158>`__)
15+
* `@saadmk11 <http://github.com/saadmk11>`__: Remove PR Builder Project Idea from RTD GSoC Docs (`#6147 <https://github.com/readthedocs/readthedocs.org/pull/6147>`__)
16+
* `@ericholscher <http://github.com/ericholscher>`__: Serialize time in search queries properly (`#6142 <https://github.com/readthedocs/readthedocs.org/pull/6142>`__)
17+
* `@humitos <http://github.com/humitos>`__: Allow to extend DomainCreate view (`#6139 <https://github.com/readthedocs/readthedocs.org/pull/6139>`__)
18+
* `@saadmk11 <http://github.com/saadmk11>`__: Integration Re-sync Bug Fix (`#6124 <https://github.com/readthedocs/readthedocs.org/pull/6124>`__)
19+
* `@stsewd <http://github.com/stsewd>`__: Don't log BuildEnvironmentWarning as error (`#6112 <https://github.com/readthedocs/readthedocs.org/pull/6112>`__)
20+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Add Search Guide (`#6101 <https://github.com/readthedocs/readthedocs.org/pull/6101>`__)
21+
* `@saadmk11 <http://github.com/saadmk11>`__: Add PR Builder guide to docs (`#6093 <https://github.com/readthedocs/readthedocs.org/pull/6093>`__)
22+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Record search queries smartly (`#6088 <https://github.com/readthedocs/readthedocs.org/pull/6088>`__)
23+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Remove 'highlight' URL param from search results (`#6087 <https://github.com/readthedocs/readthedocs.org/pull/6087>`__)
24+
125
Version 3.7.4
226
-------------
327

docs/_static/security/pgpkey.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
-----BEGIN PGP PUBLIC KEY BLOCK-----
2+
Comment: GPGTools - http://gpgtools.org
3+
4+
mQINBFqNz1ABEADvgtp3LT1pV5wuTyBPaKrbWBFj10eKyQ15wfgyc2RR6Ix5QnBo
5+
6BcJ4fpgBhSwlngsrm0WU5kI/jH7ySwzbDpYCRiLvGJx+pEYLuBBOSm6r5M1N+FV
6+
xq3ShT4mHXhwPS1mKf9Xe+KlMdYa2e5TlBEr+TxGAmFFrOLjPxw6IDHgP3MVidr2
7+
iHA2PAATl6H9ZYvNzLkI2sP7h0V1/ADd43YpAK4yk6gdVjype5ez8lmoxDKNabMt
8+
dSfdOup8zy/fbC5KlxqrT9hHBkYfQWDLWXWcDW111q+ZvncujCrpONaY86bcQ3nn
9+
QgkeWCwj254vvqsrygEU93reC2onWaROUKoLlX1/1m2k2X3qze/hJRFZaljXVPKH
10+
jV/5q88EbjSUDgY5v9mdX8jhJAukx9HkOFdkMSh3RBgu1r+UPnCNd9K4T2nN0LBL
11+
c9NTG0HW7Di5ivEVq74SqDIeiVeOrfY/B6pRuUm/kNPcvZ+ZQPeNk6JUMqEemO9Q
12+
h0VHSkgkhCPWPO9c9wWJz7O6y6vXgsFG7BZg7mTVOiKbdgneGo/rKRvuBlQ7hCvP
13+
PklwyRn90SJSgv7NF6HMm4TA1R9mzp+90oXjrDXARXmGTsPtcDXFv7xqpK1+Mfcn
14+
ajEJYdIRNWVgx0E2RzHRipdG5MIQ5Plf4/GasVHl71nMGY06oIu1T+44MQARAQAB
15+
tFpSZWFkIHRoZSBEb2NzIFNlY3VyaXR5IFRlYW0gKGh0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BDE7DFe5BBYb+vJS4/JHNDoSpk+jNezaf3hdx9+fh2DIoL84fs1FRRAl3Od
48+
6LWPAt3twOQLS0KsQh0GSIZ+zdJf3xvlZ4ixAaPB4iAF8bXYzvsODN3LRQIGhet2
49+
NzjD41f5IrAlG/qFiC6s/YLj1DWanLw2nTzSi4x3v0Gc4DEXPebB3KvaNEmqoKGP
50+
5aXa9IPbvzEVCX82qjeqCPYAsYVOBQnFEAcnkrQ76363oJTeTHxK7kgewS2YCVyy
51+
7wVinR8eyrs+3AWrZ5Op817HgxGvAVDGOEK+1OX9g1wt+IdxX00s85/T+Zk9RF6H
52+
wtRaD9li
53+
=LjIC
54+
-----END PGP PUBLIC KEY BLOCK-----

docs/connected-accounts.rst

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Connecting Your Account
2-
-----------------------
2+
=======================
33

44
If you are going to import repositories from GitHub, Bitbucket, or GitLab,
55
you should connect your Read the Docs account to your repository host first.
@@ -18,3 +18,69 @@ and select `Connected Services <https://readthedocs.org/accounts/social/connecti
1818
From here, you'll be able to connect to your GitHub, Bitbucket or GitLab
1919
account. This process will ask you to authorize a connection to Read the Docs,
2020
that allows us to read information about and clone your repositories.
21+
22+
23+
Permissions for connected accounts
24+
----------------------------------
25+
26+
Read the Docs does not generally ask for write permission to your repositories' code
27+
(with one exception detailed below)
28+
and since we only connect to public repositories we don't need special permissions to read them.
29+
However, we do need permissions for authorizing your account
30+
so that you can login to Read the Docs with your connected account credentials
31+
and to setup :doc:`webhooks`
32+
which allow us to build your documentation on every change to your repository.
33+
34+
35+
GitHub
36+
~~~~~~
37+
38+
Read the Docs requests the following permissions (more precisely, `OAuth scopes`_)
39+
when connecting your Read the Docs account to GitHub.
40+
41+
.. _OAuth scopes: https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/
42+
43+
Read access to your email address (``user:email``)
44+
We ask for this so you can create a Read the Docs account and login with your GitHub credentials.
45+
46+
Administering webhooks (``admin:repo_hook``)
47+
We ask for this so we can create webhooks on your repositories when you import them into Read the Docs.
48+
This allows us to build the docs when you push new commits.
49+
50+
Read access to your organizations (``read:org``)
51+
We ask for this so we know which organizations you have access to.
52+
This allows you to filter repositories by organization when importing repositories.
53+
54+
Repository status (``repo:status``)
55+
Repository statuses allow Read the Docs to report the status
56+
(eg. passed, failed, pending) of pull requests to GitHub.
57+
This is used for a feature currently in beta testing
58+
that builds documentation on each pull request similar to a continuous integration service.
59+
60+
.. note::
61+
62+
:doc:`Read the Docs for Business </commercial/index>`
63+
asks for one additional permission (``repo``) to allow access to private repositories
64+
and to allow us to setup SSH keys to clone your private repositories.
65+
Unfortunately, this is the permission for read/write control of the repository
66+
but there isn't a more granular permission
67+
that only allows setting up SSH keys for read access.
68+
69+
70+
Bitbucket
71+
~~~~~~~~~
72+
73+
For similar reasons to those above for GitHub, we request permissions for:
74+
75+
* Reading your account information including your email address
76+
* Read access to your team memberships
77+
* Read access to your repositories
78+
* Read and write access to webhooks
79+
80+
GitLab
81+
~~~~~~
82+
83+
Like the others, we request permissions for:
84+
85+
* Reading your account information (``read_user``)
86+
* API access (``api``) which is needed to create webhooks in GitLab

docs/faq.rst

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -81,30 +81,14 @@ I get import errors on libraries that depend on C modules
8181
---------------------------------------------------------
8282

8383
.. note::
84-
Another use case for this is when you have a module with a C extension.
8584

86-
This happens because our build system doesn't have the dependencies for building your project. This happens with things like ``libevent``, ``mysql``, and other python packages that depend on C libraries. We can't support installing random C binaries on our system, so there is another way to fix these imports.
85+
Another use case for this is when you have a module with a C extension.
8786

88-
With Sphinx you can use the built-in `autodoc_mock_imports`_ for mocking. Alternatively you can use the mock library by putting the following snippet in your ``conf.py``::
89-
90-
import sys
91-
from unittest.mock import MagicMock
92-
93-
class Mock(MagicMock):
94-
@classmethod
95-
def __getattr__(cls, name):
96-
return MagicMock()
97-
98-
MOCK_MODULES = ['pygtk', 'gtk', 'gobject', 'argparse', 'numpy', 'pandas']
99-
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
100-
101-
You need to replace ``MOCK_MODULES`` with the modules that you want to mock out.
102-
103-
.. Tip:: The library ``unittest.mock`` was introduced on python 3.3. On earlier versions install the ``mock`` library
104-
from PyPI with (ie ``pip install mock``) and replace the above import::
105-
106-
from mock import Mock as MagicMock
87+
This happens because our build system doesn't have the dependencies for building your project.
88+
This happens with things like ``libevent``, ``mysql``, and other python packages that depend on C libraries.
89+
We can't support installing random C binaries on our system, so there is another way to fix these imports.
10790

91+
With Sphinx you can use the built-in `autodoc_mock_imports`_ for mocking.
10892
If such libraries are installed via ``setup.py``, you also will need to remove all the C-dependent libraries from your ``install_requires`` in the RTD environment.
10993

11094
.. _autodoc_mock_imports: http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_mock_imports

docs/security.rst

Lines changed: 34 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,36 @@
1+
.. This document is linked from:
2+
.. https://readthedocs.org/.well-known/security.txt
3+
.. https://readthedocs.org/security/
4+
15
Security
26
========
37

4-
Security is very important to us at Read the Docs. We are committed to responsible reporting and disclosure of security issues.
8+
Security is very important to us at Read the Docs.
9+
We follow generally accepted industry standards to protect the personal information
10+
submitted to us, both during transmission and once we receive it.
11+
In the spirit of transparency,
12+
we are committed to responsible reporting and disclosure of security issues.
13+
14+
.. contents:: Contents
15+
:local:
16+
:backlinks: none
17+
:depth: 1
18+
19+
20+
Account security
21+
----------------
22+
23+
* All traffic is encrypted in transit so your login is protected.
24+
* Read the Docs stores only one-way hashes of all passwords.
25+
Nobody at Read the Docs has access to your passwords.
26+
* Account login is protected from brute force attacks with rate limiting.
27+
* While most projects and docs on Read the Docs are public,
28+
we treat your private repositories and private documentation as confidential
29+
and Read the Docs employees may only view them
30+
with your explicit permission in response to your support requests,
31+
or when required for security purposes.
32+
* You can read more about account privacy in our :doc:`privacy-policy`.
33+
534

635
Reporting a security issue
736
--------------------------
@@ -17,69 +46,13 @@ You can expect:
1746
* We will notify you when the issue is fixed.
1847
* We will add the issue to our :ref:`security issue archive <security:Security issue archive>`.
1948

49+
2050
PGP key
2151
-------
2252

23-
You may use this `PGP key`__ to securely communicate with us and to verify signed messages you receive from us.
24-
25-
__ https://pgp.mit.edu/pks/lookup?op=vindex&search=0xFEEF9FC2DD21D271
26-
27-
::
28-
29-
-----BEGIN PGP PUBLIC KEY BLOCK-----
30-
Comment: GPGTools - http://gpgtools.org
31-
32-
mQINBFqNz1ABEADvgtp3LT1pV5wuTyBPaKrbWBFj10eKyQ15wfgyc2RR6Ix5QnBo
33-
6BcJ4fpgBhSwlngsrm0WU5kI/jH7ySwzbDpYCRiLvGJx+pEYLuBBOSm6r5M1N+FV
34-
xq3ShT4mHXhwPS1mKf9Xe+KlMdYa2e5TlBEr+TxGAmFFrOLjPxw6IDHgP3MVidr2
35-
iHA2PAATl6H9ZYvNzLkI2sP7h0V1/ADd43YpAK4yk6gdVjype5ez8lmoxDKNabMt
36-
dSfdOup8zy/fbC5KlxqrT9hHBkYfQWDLWXWcDW111q+ZvncujCrpONaY86bcQ3nn
37-
QgkeWCwj254vvqsrygEU93reC2onWaROUKoLlX1/1m2k2X3qze/hJRFZaljXVPKH
38-
jV/5q88EbjSUDgY5v9mdX8jhJAukx9HkOFdkMSh3RBgu1r+UPnCNd9K4T2nN0LBL
39-
c9NTG0HW7Di5ivEVq74SqDIeiVeOrfY/B6pRuUm/kNPcvZ+ZQPeNk6JUMqEemO9Q
40-
h0VHSkgkhCPWPO9c9wWJz7O6y6vXgsFG7BZg7mTVOiKbdgneGo/rKRvuBlQ7hCvP
41-
PklwyRn90SJSgv7NF6HMm4TA1R9mzp+90oXjrDXARXmGTsPtcDXFv7xqpK1+Mfcn
42-
ajEJYdIRNWVgx0E2RzHRipdG5MIQ5Plf4/GasVHl71nMGY06oIu1T+44MQARAQAB
43-
tFpSZWFkIHRoZSBEb2NzIFNlY3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MfVRmnXnW
75-
m/GM3BDE7DFe5BBYb+vJS4/JHNDoSpk+jNezaf3hdx9+fh2DIoL84fs1FRRAl3Od
76-
6LWPAt3twOQLS0KsQh0GSIZ+zdJf3xvlZ4ixAaPB4iAF8bXYzvsODN3LRQIGhet2
77-
NzjD41f5IrAlG/qFiC6s/YLj1DWanLw2nTzSi4x3v0Gc4DEXPebB3KvaNEmqoKGP
78-
5aXa9IPbvzEVCX82qjeqCPYAsYVOBQnFEAcnkrQ76363oJTeTHxK7kgewS2YCVyy
79-
7wVinR8eyrs+3AWrZ5Op817HgxGvAVDGOEK+1OX9g1wt+IdxX00s85/T+Zk9RF6H
80-
wtRaD9li
81-
=LjIC
82-
-----END PGP PUBLIC KEY BLOCK-----
53+
You may use this :download:`PGP key </_static/security/pgpkey.txt>`
54+
to securely communicate with us and to verify signed messages you receive from us.
55+
8356

8457
Security issue archive
8558
----------------------

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": "0.0.1",
3+
"version": "3.7.5",
44
"description": "Read the Docs build dependencies",
55
"author": "Anthony Johnson <[email protected]>",
66
"scripts": {

readthedocs/builds/storage.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import logging
22
from pathlib import Path
33

4+
from django.conf import settings
45
from django.core.exceptions import SuspiciousFileOperation
56
from django.core.files.storage import FileSystemStorage
67
from storages.utils import safe_join, get_available_overwrite_name
@@ -107,7 +108,19 @@ def walk(self, top):
107108

108109
class BuildMediaFileSystemStorage(BuildMediaStorageMixin, FileSystemStorage):
109110

110-
"""Storage subclass that writes build artifacts under MEDIA_ROOT."""
111+
"""Storage subclass that writes build artifacts in PRODUCTION_MEDIA_ARTIFACTS or MEDIA_ROOT."""
112+
113+
def __init__(self, **kwargs):
114+
location = kwargs.pop('location', None)
115+
116+
if not location:
117+
# Mirrors the logic of getting the production media path
118+
if settings.DEFAULT_PRIVACY_LEVEL == 'public' or settings.DEBUG:
119+
location = settings.MEDIA_ROOT
120+
else:
121+
location = settings.PRODUCTION_MEDIA_ARTIFACTS
122+
123+
super().__init__(location)
111124

112125
def get_available_name(self, name, max_length=None):
113126
"""

readthedocs/builds/views.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ def post(self, request, project_slug):
5555

5656
version_slug = request.POST.get('version_slug')
5757
version = get_object_or_404(
58-
Version.internal.all(),
59-
project=project,
58+
self._get_versions(project),
6059
slug=version_slug,
6160
)
6261

@@ -79,6 +78,12 @@ def post(self, request, project_slug):
7978
reverse('builds_detail', args=[project.slug, build.pk]),
8079
)
8180

81+
def _get_versions(self, project):
82+
return Version.internal.public(
83+
user=self.request.user,
84+
project=project,
85+
)
86+
8287

8388
class BuildList(BuildBase, BuildTriggerMixin, ListView):
8489

@@ -91,10 +96,7 @@ def get_context_data(self, **kwargs):
9196

9297
context['project'] = self.project
9398
context['active_builds'] = active_builds
94-
context['versions'] = Version.internal.public(
95-
user=self.request.user,
96-
project=self.project,
97-
)
99+
context['versions'] = self._get_versions(self.project)
98100
context['build_qs'] = self.get_queryset()
99101

100102
return context

readthedocs/core/static/core/js/readthedocs-doc-embed.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)