Browse Source

Fix #564

pull/579/head
Eduardo Calil 8 years ago
parent
commit
23b435540e
  1. 7
      sapl/base/views.py

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

Loading…
Cancel
Save