1
0
Fork 0
mirror of synced 2024-07-01 20:40:41 +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) return render(template_name=self.template, request=request, context=context)
def post(self, request): def post(self, request):
#url = request.POST['url'] if not request.user.is_authenticated and not PUBLIC_INDEX:
#if url: return redirect(f'/admin/login/?next={request.path}')
form = AddLinkForm(request.POST) form = AddLinkForm(request.POST)
if form.is_valid(): if form.is_valid():
url = form.cleaned_data["url"] url = form.cleaned_data["url"]