ensured in apps.dashboard.views, w. passing ITs in .tests.integrated.test_views & passing FT in functional_tests.test_sharing, passes only to recipients & owner
This commit is contained in:
@@ -23,6 +23,13 @@ def new_list(request):
|
||||
|
||||
def view_list(request, list_id):
|
||||
our_list = List.objects.get(id=list_id)
|
||||
|
||||
if our_list.owner:
|
||||
if not request.user.is_authenticated:
|
||||
return redirect("/")
|
||||
if request.user != our_list.owner and request.user not in our_list.shared_with.all():
|
||||
return HttpResponseForbidden()
|
||||
|
||||
form = ExistingListItemForm(for_list=our_list)
|
||||
|
||||
if request.method == "POST":
|
||||
|
||||
Reference in New Issue
Block a user