-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Use ServeDocsPermissionsMixin to isolate this methods and be more clear #6408
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
Conversation
3689847
to
60b121f
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
||
:rtype: django.http.HttpResponse | ||
""" | ||
return self._serve_401(request, project) |
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.
I don't quite understand what this is meant to be doing. Are we using these additional methods, or are they just meant to be overwritten?
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 are overriding these methods from corporate. They are meant to be overwritten.
This PR just move them outside the main class and put them into a mixin with better docstrings. Which is easier to understand where they come from. That's all.
I could move the docstrings to the Base class, otherwise.
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.
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.
@ericholscher see https://github.com/readthedocs/readthedocs.org/pull/6572/files#r371770894
I'm fine with either. I think defaulting to False
and force re-define it, it's safer, though.
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.
Yea, it should default False 👍
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 good, likely need to be updated w/ the changes from #6572.
|
||
:rtype: django.http.HttpResponse | ||
""" | ||
return self._serve_401(request, project) |
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.
…humitos/use-doc-permission-mixin
…humitos/use-doc-permission-mixin
|
||
:rtype: django.http.HttpResponse | ||
""" | ||
return self._serve_401(request, project) |
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.
This _serve_401
method doesn't exist on this class. It shouldn't be called if we aren't implementing it.
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.
This looks good to me, but we should make sure to test it against corporate too.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Small refactor to make more clear where these method come from.