Skip to content

Commit 45a7d15

Browse files
author
Frank Duncan
committed
Change permissions to withdraw to just being an applicant
Based on Review in #3298, the decision was made that an applicant can withdraw at any time, without edit permissions, and edit permissions should not be to applicants for their own submissions.
1 parent a45ee4e commit 45a7d15

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

hypha/apply/funds/templates/funds/applicationsubmission_detail.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,10 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
9090
<svg class="icon icon--delete"><use xlink:href="#delete"></use></svg>
9191
</a>
9292
{% endif %}
93-
{% if request.user|has_edit_perm:object %}
94-
{% if request.user.is_applicant %}
93+
{% if ENABLE_SUBMISSION_WITHDRAWAL and request.user.is_applicant %}
9594
<a class="link link--withdraw-submission is-active" href="{% url 'funds:submissions:withdraw' object.id %}">
9695
{% trans "Withdraw" %}
9796
</a>
98-
{% endif %}
9997
{% endif %}
10098
{% if request.user|has_edit_perm:object %}
10199
<a class="link link--edit-submission is-active" href="{% url 'funds:submissions:edit' object.id %}">

hypha/apply/funds/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ def withdraw(self, request, *args, **kwargs):
14151415

14161416
obj = self.get_object()
14171417

1418-
if not obj.phase.permissions.can_edit(request.user):
1418+
if not request.user.is_applicant:
14191419
raise PermissionDenied
14201420

14211421
withdraw_actions = [action for action in obj.workflow[obj.status].transitions.keys() if 'withdraw' in action]

hypha/apply/funds/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def make_permissions(edit=None, review=None, view=None):
348348
'display': _('Need screening'),
349349
'public': _('Application Received'),
350350
'stage': RequestExt,
351-
'permissions': applicant_edit_permissions,
351+
'permissions': default_permissions,
352352
},
353353
'ext_more_info': {
354354
'transitions': {
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.link--withdraw-submission {
22
margin-right: 1rem;
33
padding-right: 1rem;
4-
border-right: 2px solid #cfcfcf;
54
font-weight: 700;
65
}

0 commit comments

Comments
 (0)