Skip to content

Commit 28b8240

Browse files
merge commit
2 parents 1477446 + 98a7ff1 commit 28b8240

40 files changed

+1050
-401
lines changed

CHANGELOG.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
Version 3.7.4
2+
-------------
3+
4+
:Date: September 05, 2019
5+
6+
* `@ericholscher <http://github.com/ericholscher>`__: Remove paid support callout (`#6140 <https://github.com/readthedocs/readthedocs.org/pull/6140>`__)
7+
* `@ericholscher <http://github.com/ericholscher>`__: Fix IntegrationAdmin with raw_id_fields for Projects (`#6136 <https://github.com/readthedocs/readthedocs.org/pull/6136>`__)
8+
* `@ericholscher <http://github.com/ericholscher>`__: Fix link to html_extra_path (`#6135 <https://github.com/readthedocs/readthedocs.org/pull/6135>`__)
9+
* `@stsewd <http://github.com/stsewd>`__: Move out authorization from FooterHTML view (`#6133 <https://github.com/readthedocs/readthedocs.org/pull/6133>`__)
10+
* `@agjohnson <http://github.com/agjohnson>`__: Add setting for always cleaning the build post-build (`#6132 <https://github.com/readthedocs/readthedocs.org/pull/6132>`__)
11+
* `@pyup-bot <http://github.com/pyup-bot>`__: pyup: Scheduled weekly dependency update for week 35 (`#6129 <https://github.com/readthedocs/readthedocs.org/pull/6129>`__)
12+
* `@stsewd <http://github.com/stsewd>`__: Refactor footer_html view to class (`#6125 <https://github.com/readthedocs/readthedocs.org/pull/6125>`__)
13+
* `@ericholscher <http://github.com/ericholscher>`__: Use raw_id_fields in the TokenAdmin (`#6116 <https://github.com/readthedocs/readthedocs.org/pull/6116>`__)
14+
* `@davidfischer <http://github.com/davidfischer>`__: Fixed footer ads supported on all themes (`#6115 <https://github.com/readthedocs/readthedocs.org/pull/6115>`__)
15+
* `@stsewd <http://github.com/stsewd>`__: Don't log BuildEnvironmentWarning as error (`#6112 <https://github.com/readthedocs/readthedocs.org/pull/6112>`__)
16+
* `@pllim <http://github.com/pllim>`__: Use the force when fetching with Git (`#6109 <https://github.com/readthedocs/readthedocs.org/pull/6109>`__)
17+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Record search queries smartly (`#6088 <https://github.com/readthedocs/readthedocs.org/pull/6088>`__)
18+
* `@stsewd <http://github.com/stsewd>`__: Add move method to automation rule (`#5998 <https://github.com/readthedocs/readthedocs.org/pull/5998>`__)
19+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Index more domain data into elasticsearch (`#5979 <https://github.com/readthedocs/readthedocs.org/pull/5979>`__)
20+
21+
Version 3.7.3
22+
-------------
23+
24+
:Date: August 27, 2019
25+
26+
* `@pllim <http://github.com/pllim>`__: Use the force when fetching with Git (`#6109 <https://github.com/readthedocs/readthedocs.org/pull/6109>`__)
27+
* `@davidfischer <http://github.com/davidfischer>`__: Small improvements to the SEO guide (`#6105 <https://github.com/readthedocs/readthedocs.org/pull/6105>`__)
28+
* `@davidfischer <http://github.com/davidfischer>`__: Update intersphinx mapping with canonical sources (`#6085 <https://github.com/readthedocs/readthedocs.org/pull/6085>`__)
29+
* `@davidfischer <http://github.com/davidfischer>`__: Fix lingering 500 issues (`#6079 <https://github.com/readthedocs/readthedocs.org/pull/6079>`__)
30+
* `@davidfischer <http://github.com/davidfischer>`__: Technical docs SEO guide (`#6077 <https://github.com/readthedocs/readthedocs.org/pull/6077>`__)
31+
* `@saadmk11 <http://github.com/saadmk11>`__: GitLab Build Status Reporting for PR Builder (`#6076 <https://github.com/readthedocs/readthedocs.org/pull/6076>`__)
32+
* `@davidfischer <http://github.com/davidfischer>`__: Update ad details docs (`#6074 <https://github.com/readthedocs/readthedocs.org/pull/6074>`__)
33+
* `@davidfischer <http://github.com/davidfischer>`__: Gold makes projects ad-free again (`#6073 <https://github.com/readthedocs/readthedocs.org/pull/6073>`__)
34+
* `@saadmk11 <http://github.com/saadmk11>`__: Auto Sync and Re-Sync for Manually Created Integrations (`#6071 <https://github.com/readthedocs/readthedocs.org/pull/6071>`__)
35+
* `@pyup-bot <http://github.com/pyup-bot>`__: pyup: Scheduled weekly dependency update for week 32 (`#6067 <https://github.com/readthedocs/readthedocs.org/pull/6067>`__)
36+
* `@saadmk11 <http://github.com/saadmk11>`__: PR Builder GitLab Integration (`#6066 <https://github.com/readthedocs/readthedocs.org/pull/6066>`__)
37+
* `@davidfischer <http://github.com/davidfischer>`__: Send media downloads to analytics (`#6063 <https://github.com/readthedocs/readthedocs.org/pull/6063>`__)
38+
* `@davidfischer <http://github.com/davidfischer>`__: IPv6 in X-Forwarded-For fix (`#6062 <https://github.com/readthedocs/readthedocs.org/pull/6062>`__)
39+
* `@humitos <http://github.com/humitos>`__: Remove warning about beta state of conda support (`#6056 <https://github.com/readthedocs/readthedocs.org/pull/6056>`__)
40+
* `@saadmk11 <http://github.com/saadmk11>`__: Update GitLab Webhook creating to enable merge request events (`#6055 <https://github.com/readthedocs/readthedocs.org/pull/6055>`__)
41+
* `@ericholscher <http://github.com/ericholscher>`__: Release 3.7.2 (`#6054 <https://github.com/readthedocs/readthedocs.org/pull/6054>`__)
42+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Update feature flags docs (`#6053 <https://github.com/readthedocs/readthedocs.org/pull/6053>`__)
43+
* `@saadmk11 <http://github.com/saadmk11>`__: Add indelx.html filename to the external doc url (`#6051 <https://github.com/readthedocs/readthedocs.org/pull/6051>`__)
44+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Search analytics improvements (`#6050 <https://github.com/readthedocs/readthedocs.org/pull/6050>`__)
45+
* `@stsewd <http://github.com/stsewd>`__: Sort versions taking into consideration the vcs type (`#6049 <https://github.com/readthedocs/readthedocs.org/pull/6049>`__)
46+
* `@humitos <http://github.com/humitos>`__: Avoid returning invalid domain when using USE_SUBDOMAIN=True in dev (`#6026 <https://github.com/readthedocs/readthedocs.org/pull/6026>`__)
47+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Search analytics (`#6019 <https://github.com/readthedocs/readthedocs.org/pull/6019>`__)
48+
* `@tapaswenipathak <http://github.com/tapaswenipathak>`__: Remove django-guardian model (`#6005 <https://github.com/readthedocs/readthedocs.org/pull/6005>`__)
49+
* `@stsewd <http://github.com/stsewd>`__: Add manager and description field to AutomationRule model (`#5995 <https://github.com/readthedocs/readthedocs.org/pull/5995>`__)
50+
* `@davidfischer <http://github.com/davidfischer>`__: Cleanup project tags (`#5983 <https://github.com/readthedocs/readthedocs.org/pull/5983>`__)
51+
* `@davidfischer <http://github.com/davidfischer>`__: Search indexing with storage (`#5854 <https://github.com/readthedocs/readthedocs.org/pull/5854>`__)
52+
* `@wilvk <http://github.com/wilvk>`__: fix sphinx startup guide to not to fail on rtd build as per #2569 (`#5753 <https://github.com/readthedocs/readthedocs.org/pull/5753>`__)
53+
154
Version 3.7.2
255
-------------
356

docs/custom_installs/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ It has those features and more!
1212

1313
.. warning::
1414
These documents are maintained by the community, and might not be up to date.
15-
Read the Docs developers do not support custom installs of our software
16-
in our public issue tracker. For additional support of a custom installation,
17-
please see our `paid support plans <https://readthedocs.com/services/#open-source-support>`_.
15+
Read the Docs developers do not support custom installs of our software,
16+
as mentioned in our :doc:`/open-source-philosophy`.
1817

1918
.. toctree::
2019
:maxdepth: 2

docs/faq.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ To accomplish this, you can add a ``robots.txt`` file to your documentation's ro
257257

258258

259259
Minimal example of ``robots.txt``
260-
+++++++++++++++++++++++++++++++++
260+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
261261

262262
::
263263

@@ -270,22 +270,28 @@ Minimal example of ``robots.txt``
270270
See `Google's docs`_ for its full syntax.
271271

272272
This file has to be served as is under ``/robots.txt``.
273-
Depending if you are using Sphinx or MkDocs, you will need a different configuration for this.
274273

274+
Setup
275+
~~~~~
275276

276-
Sphinx
277-
~~~~~~
277+
The ``robots.txt`` file will be served from the **default version** of your Project.
278+
This is because the ``robots.txt`` file is served at the top-level of your domain,
279+
so we must choose a version to find the file in.
280+
The **default version** is the best place to look for it.
281+
282+
Sphinx and Mkdocs both have different ways of outputting static files in the build:
278283

279-
Sphinx uses `html_extra`_ option to add static files to the output.
280-
You need to create a ``robots.txt`` file and put it under the path defined in ``html_extra``.
284+
Sphinx
285+
++++++
281286

287+
Sphinx uses `html_extra_path`_ option to add static files to the output.
288+
You need to create a ``robots.txt`` file and put it under the path defined in ``html_extra_path``.
282289

283290
MkDocs
284-
~~~~~~
291+
++++++
285292

286293
MkDocs needs the ``robots.txt`` to be at the directory defined at `docs_dir`_ config.
287294

288-
289295
.. _Google's docs: https://support.google.com/webmasters/answer/6062608
290-
.. _html_extra: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_extra_path
296+
.. _html_extra_path: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_extra_path
291297
.. _docs_dir: https://www.mkdocs.org/user-guide/configuration/#docs_dir

media/css/core.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,11 @@ a.cta-btn:hover, a.cta-btn:active {
379379

380380
/* search */
381381

382-
.search {
383-
border-bottom: solid 1px #bfbfbf;
384-
margin-bottom: 24px;
385-
}
382+
.search { border-bottom: solid 1px #bfbfbf; margin-bottom: 24px; }
386383
.search input[type=text] { float: left; margin-right: 10px; padding: 8px 10px; }
387384
.search input[type=submit] { margin-top: 0; }
385+
/* this is same as the css class ".highlighted" */
386+
.search-result-item span { background-color: #ee9; padding: 0 1px; margin: 0 1px; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
388387

389388
.filter { margin-bottom: 1em; }
390389
.filter dd { display: inline-block; margin-right: 0.75em; }

readthedocs/api/v2/permissions.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from rest_framework import permissions
44

5+
from readthedocs.builds.models import Version
56
from readthedocs.core.permissions import AdminPermission
67

78

@@ -83,3 +84,32 @@ def has_object_permission(self, request, view, obj):
8384
request.method in permissions.SAFE_METHODS or
8485
(request.user and request.user.is_staff)
8586
)
87+
88+
89+
class IsAuthorizedToViewVersion(permissions.BasePermission):
90+
91+
"""
92+
Checks if the user from the request has permissions to see the version.
93+
94+
This permission class used in the FooterHTML view.
95+
96+
.. note::
97+
98+
Views using this permissions should implement the
99+
`_get_version` and `_get_project` methods.
100+
"""
101+
102+
def has_permission(self, request, view):
103+
project = view._get_project()
104+
version = view._get_version()
105+
has_access = (
106+
Version.objects
107+
.public(
108+
user=request.user,
109+
project=project,
110+
only_active=False,
111+
)
112+
.filter(pk=version.pk)
113+
.exists()
114+
)
115+
return has_access

readthedocs/api/v2/urls.py

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

5757
function_urls = [
5858
url(r'docurl/', core_views.docurl, name='docurl'),
59-
url(r'footer_html/', footer_views.footer_html, name='footer_html'),
59+
url(r'footer_html/', footer_views.FooterHTML.as_view(), name='footer_html'),
6060
]
6161

6262
task_urls = [

0 commit comments

Comments
 (0)