Commit 36330815 authored by fred's avatar fred

allow users with delete_diffusion perm to delete diffusions

parent 9920f560
......@@ -365,7 +365,7 @@ class AbsenceForm(forms.ModelForm):
emission = kwargs.get('initial', {}).get('emission')
user = kwargs.get('initial', {}).get('user')
self.fields['datetime'].widget.emission = emission
if user and user.is_staff:
if (user and user.has_perm('emissions.delete_diffusion')):
date = emission.get_next_planned_date()
self.fields['datetime'].initial = date
self.fields['datetime'].widget = DateTimeWidget()
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