Commit b1d81fb0 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Add a reason parameter in project deny requests

if not set, None is passed
parent b8d82f1e
......@@ -1546,6 +1546,10 @@ def project_app_approve(request, application_id, ctx=None):
def project_app_deny(request, application_id, ctx=None):
reason = request.POST.get('reason', None)
if not reason:
reason = None
if not request.user.is_project_admin():
m = _(astakos_messages.NOT_ALLOWED)
raise PermissionDenied(m)
......@@ -1555,7 +1559,7 @@ def project_app_deny(request, application_id, ctx=None):
except ProjectApplication.DoesNotExist:
raise Http404
deny_application(application_id, reason=reason)
return redirect(reverse('project_list'))
Markdown is supported
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