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):