Commit 4def1ec2 authored by Janez K's avatar Janez K
Browse files

login required na your workflows view

parent 246ce688
......@@ -71,10 +71,11 @@ def workflow_information(request,workflow_id):
w.unique_connections.append(conn)
return render(request, 'website/existing.html', {'workflows':[w,]})
@login_required
def your_workflows(request):
return render(request, 'website/yourworkflows.html', {'workflows':request.user.workflows.filter(widget=None)})
@login_required
def make_public(request,workflow_id):
workflow = get_object_or_404(Workflow,pk=workflow_id)
if request.user == workflow.user:
......@@ -82,6 +83,7 @@ def make_public(request,workflow_id):
workflow.save()
return redirect('your workflows')
@login_required
def make_private(request,workflow_id):
workflow = get_object_or_404(Workflow,pk=workflow_id)
if request.user == workflow.user:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment