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'] list_field_names = ['codigo', 'nome', 'sigla']
def has_permission(self): def has_permission(self):
if self.request.user.is_superuser: return permissao_tb_aux(self)
return True
else:
return False
class CreateView(PermissionRequiredMixin, CrudCreateView): class CreateView(PermissionRequiredMixin, CrudCreateView):
permission_required = {'base.add_casa_legislativa'}
form_class = CasaLegislativaForm form_class = CasaLegislativaForm
class UpdateView(PermissionRequiredMixin, CrudUpdateView): class UpdateView(PermissionRequiredMixin, CrudUpdateView):
permission_required = {'base.change_casalegislativa'}
form_class = CasaLegislativaForm form_class = CasaLegislativaForm
class DetailView(CrudDetailView): class DetailView(CrudDetailView):

Loading…
Cancel
Save