From 23b435540ed7ed7deb909e4348a1ca56233b9380 Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Mon, 12 Sep 2016 10:03:50 -0300 Subject: [PATCH] Fix #564 --- sapl/base/views.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sapl/base/views.py b/sapl/base/views.py index ca5d735a3..66267d3e6 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -136,17 +136,12 @@ class CasaLegislativaCrud(Crud): list_field_names = ['codigo', 'nome', 'sigla'] def has_permission(self): - if self.request.user.is_superuser: - return True - else: - return False + return permissao_tb_aux(self) class CreateView(PermissionRequiredMixin, CrudCreateView): - permission_required = {'base.add_casa_legislativa'} form_class = CasaLegislativaForm class UpdateView(PermissionRequiredMixin, CrudUpdateView): - permission_required = {'base.change_casalegislativa'} form_class = CasaLegislativaForm class DetailView(CrudDetailView):