Skip to content

Commit

Permalink
Change permissions to withdraw to just being an applicant
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Frank Duncan authored and frjo committed Jul 26, 2023
1 parent 997f653 commit 14758f2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,10 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
<svg class="icon icon--delete"><use xlink:href="#delete"></use></svg>
</a>
{% endif %}
{% if request.user|has_edit_perm:object %}
{% if request.user.is_applicant %}
{% if ENABLE_SUBMISSION_WITHDRAWAL and request.user.is_applicant %}
<a class="link link--withdraw-submission is-active" href="{% url 'funds:submissions:withdraw' object.id %}">
{% trans "Withdraw" %}
</a>
{% endif %}
{% endif %}
{% if request.user|has_edit_perm:object %}
<a class="link link--edit-submission is-active" href="{% url 'funds:submissions:edit' object.id %}">
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/funds/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ def withdraw(self, request, *args, **kwargs):

obj = self.get_object()

if not obj.phase.permissions.can_edit(request.user):
if not request.user.is_applicant:
raise PermissionDenied

withdraw_actions = [action for action in obj.workflow[obj.status].transitions.keys() if 'withdraw' in action]
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/funds/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def make_permissions(edit=None, review=None, view=None):
'display': _('Need screening'),
'public': _('Application Received'),
'stage': RequestExt,
'permissions': applicant_edit_permissions,
'permissions': default_permissions,
},
'ext_more_info': {
'transitions': {
Expand Down
1 change: 0 additions & 1 deletion hypha/static_src/src/sass/apply/custom/_custom.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.link--withdraw-submission {
margin-right: 1rem;
padding-right: 1rem;
border-right: 2px solid #cfcfcf;
font-weight: 700;
}

0 comments on commit 14758f2

Please sign in to comment.