From 7697ae6490e2e146e96911b2c0d571017fe1584c Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Wed, 21 Sep 2022 11:58:29 -0300 Subject: [PATCH] =?UTF-8?q?Altera=20permiss=C3=B5es=20em=20Hist=C3=B3rico?= =?UTF-8?q?=20Proposi=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/materia/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sapl/materia/views.py b/sapl/materia/views.py index d02959e83..3cee2ab04 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -1253,7 +1253,10 @@ class HistoricoProposicaoView(PermissionRequiredMixin, ListView): ordering = ['-data_hora'] paginate_by = 10 model = HistoricoProposicao - permission_required = ('materia.detail_proposicao_enviada', ) + permission_required = ('materia.detail_proposicao_enviada', + 'materia.detail_proposicao_devolvida', + 'materia.detail_proposicao_incorporada' + ) def get_queryset(self): qs = super().get_queryset() @@ -1266,7 +1269,7 @@ class HistoricoProposicaoView(PermissionRequiredMixin, ListView): if not user.is_superuser and grupo_autor.user_set.filter( id=user.id).exists(): - autores = Autor.objects.filter(user=user) + autores = Autor.objects.filter(operadores=user) qs = qs.filter(proposicao__autor__in=autores) return qs