Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put view under login #6193

Merged
merged 8 commits into from Oct 9, 2019
Merged

Conversation

@stsewd
Copy link
Member

@stsewd stsewd commented Sep 18, 2019

Also, we were implementing our own LoginRequiredMixin, but we already have this on django.

Copy link
Member

@ericholscher ericholscher left a comment

The title of this PR needs some work -- it doesn't explain what view or what this PR is doing :)

@@ -211,7 +210,7 @@ def account_advertising(request):
)


class TokenMixin:
Copy link
Member

@ericholscher ericholscher Sep 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the actual bugfix here?

Copy link
Member Author

@stsewd stsewd Sep 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, otherwise an anonymous user could hit that page, it was returning 500. There was a discussion on slack, sorry for the lack of context.

readthedocs/profiles/views.py Outdated Show resolved Hide resolved
Co-Authored-By: Manuel Kaufmann <humitos@gmail.com>
@stsewd stsewd requested a review from Oct 2, 2019
@stsewd
Copy link
Member Author

@stsewd stsewd commented Oct 2, 2019

Just for clarification, this PR fix this problem https://readthedocs.org/accounts/tokens/ (enter without being loged in)

Copy link
Member

@ericholscher ericholscher left a comment

Good refactor 👍

@ericholscher ericholscher merged commit c2166f9 into readthedocs:master Oct 9, 2019
2 checks passed
@stsewd stsewd deleted the put-page-under-login branch Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants