Commit c4d00c5f authored by fred's avatar fred
Browse files

don't require special delete_absence permission to delete

parent e8f99fdb
......@@ -295,7 +295,7 @@ class EmissionAddAbsenceView(CreateView):
class AbsenceDeleteView(RedirectView):
def get_redirect_url(self, emission_slug, pk):
if not self.request.user.has_perm('emissions.delete_absence'):
if not self.request.user.can_manage(emission):
raise PermissionDenied()
messages.success(self.request, SUCCESS_MESSAGE)
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