forked from mirrors/bookwyrm
Simpler feed verification logic
This commit is contained in:
parent
691f9c01c4
commit
4fb834f10f
1 changed files with 1 additions and 5 deletions
|
@ -96,15 +96,11 @@ class Status(View):
|
|||
try:
|
||||
user = get_user_from_username(request.user, username)
|
||||
status = models.Status.objects.select_subclasses().get(
|
||||
id=status_id, deleted=False
|
||||
user=user, id=status_id, deleted=False
|
||||
)
|
||||
except (ValueError, models.Status.DoesNotExist):
|
||||
return HttpResponseNotFound()
|
||||
|
||||
# the url should have the poster's username in it
|
||||
if user != status.user:
|
||||
return HttpResponseNotFound()
|
||||
|
||||
# make sure the user is authorized to see the status
|
||||
if not status.visible_to_user(request.user):
|
||||
return HttpResponseNotFound()
|
||||
|
|
Loading…
Reference in a new issue