From a486a4520515177e3c062a05bde187c44f9cb8a4 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Thu, 30 Jun 2016 17:29:36 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20permiss=C3=A3o=20=C3=A0=20tela=20de?= =?UTF-8?q?=20solicita=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/solicitacoes/views.py | 4 +++- sigi/apps/usuarios/views.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sigi/apps/solicitacoes/views.py b/sigi/apps/solicitacoes/views.py index 6dae6d0..2ba8c73 100644 --- a/sigi/apps/solicitacoes/views.py +++ b/sigi/apps/solicitacoes/views.py @@ -20,7 +20,9 @@ class SolicitacaoCrud(LoginRequiredMixin, Crud): model = Solicitacao help_path = u'' - class ListView(CrudListView): + class ListView(GroupRequiredMixin, CrudListView): + template_name = u'solicitacoes/solicitacoes_list.html' + group_required = u'Usuario_Habilitado' def get_rows(self, object_list): object_list = Solicitacao.objects.filter( diff --git a/sigi/apps/usuarios/views.py b/sigi/apps/usuarios/views.py index 8992bf3..ad8a95f 100644 --- a/sigi/apps/usuarios/views.py +++ b/sigi/apps/usuarios/views.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import +from braces.views import GroupRequiredMixin from braces.views import FormValidMessageMixin, GroupRequiredMixin from django.conf import settings