Extension page should be 404 for everyone unless publicly listed #167
@ -244,9 +244,7 @@ class ExtensionDetailView(DetailView):
|
||||
def get_object(self, queryset=None):
|
||||
"""Record a page view when returning the Extension object."""
|
||||
obj = super().get_object(queryset=queryset)
|
||||
if obj.is_listed and (
|
||||
self.request.user.is_anonymous or not obj.has_maintainer(self.request.user)
|
||||
):
|
||||
if self.request.user.is_anonymous or not obj.has_maintainer(self.request.user):
|
||||
ExtensionView.create_from_request(self.request, object_id=obj.pk)
|
||||
return obj
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user