Skip to content
Snippets Groups Projects
Commit 92440753 authored by Alexa Valentová's avatar Alexa Valentová
Browse files

update permissions

parent 5d70ec4a
No related branches found
No related tags found
No related merge requests found
Pipeline #20966 passed
......@@ -87,6 +87,21 @@ class ContractAdminForm(forms.ModelForm):
)
continue
# Allow people with approve permissions to mark contracts as TO_BE_APPROVED
if (
self.instance.status == Contract.StatusTypes.WORK_IN_PROGRESS
and choice_key == Contract.StatusTypes.TO_BE_APPROVED
and self.current_user.has_perm("contracts.approve")
):
allowed_choices.append(
(
choice_key,
choice_label,
)
)
continue
if self.instance.status == choice_key:
allowed_choices.append(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment