1
0
Fork 0
mirror of synced 2024-06-29 19:41:05 +12:00

Merge pull request #359 from cdvv7788/post-view-permission

fix: Add missing permission to add view (post)
This commit is contained in:
Nick Sweeting 2020-07-08 15:49:03 -04:00 committed by GitHub
commit ad645db7b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,8 +60,8 @@ class AddLinks(View):
return render(template_name=self.template, request=request, context=context)
def post(self, request):
#url = request.POST['url']
#if url:
if not request.user.is_authenticated and not PUBLIC_INDEX:
return redirect(f'/admin/login/?next={request.path}')
form = AddLinkForm(request.POST)
if form.is_valid():
url = form.cleaned_data["url"]