API documentation templates do not check for user authentication · Issue #5162 · encode/django-rest-framework (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@ka7eh

Description

@ka7eh

Checklist

Steps to reproduce

from rest_framework.documentation import include_docs_urls
url(r'^docs/', include_docs_urls(title='API Title', description='API description'))

Expected behavior

Users should not be able to access docs for restricted views and should see a 403.

Actual behavior

The template (document.html) doesn't check if user is authenticated or not (for restricted views) and tries to render a non-existing document object.