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
Make SupportView login_required #7997
Conversation
readthedocs/urls.py
Outdated
@@ -26,7 +27,7 @@ | |||
TemplateView | |||
.as_view(template_name='security.txt', content_type='text/plain'), | |||
), | |||
url(r'^support/$', SupportView.as_view(), name='support'), | |||
url(r'^support/$', login_required(SupportView.as_view()), name='support'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use this mxin in our code base
class PrivateViewMixin(LoginRequiredMixin): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, should probably chagne
login_required( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like Django has this builtin now: https://docs.djangoproject.com/en/2.2/topics/auth/default/#django.contrib.auth.mixins.LoginRequiredMixin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, our mixin basically inherits from that, I think we can use django's mixin directly, don't think we would be adding any other logic there.
1758dc9
to
c0fc824
Compare
Use PrivateViewMixin
c0fc824
to
239c4e3
Compare
No description provided.