From 56f43a6965f0cdd4b4275542dec651e586115968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Rodrigues?= Date: Fri, 3 Jul 2020 16:05:22 -0300 Subject: [PATCH] =?UTF-8?q?Fix=20#3174=20-=20Visualiza=C3=A7=C3=A3o=20dos?= =?UTF-8?q?=20dados=20de=20altera=C3=A7=C3=A3o=20de=20uma=20tramita=C3=A7?= =?UTF-8?q?=C3=A3o=20de=20Mat=C3=A9ria=20Legislativa=20(#3215)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix #3174 - Altera perm. visualização autor tram. * Atualização sapl/templates/materia/tramitacao_detail.html Co-authored-by: Edward <9326037+edwardoliveira@users.noreply.github.com> * Retira cód. inutilizado * Update sapl/materia/views.py Co-authored-by: Edward <9326037+edwardoliveira@users.noreply.github.com> --- sapl/materia/views.py | 4 ++-- sapl/templates/materia/tramitacao_detail.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sapl/materia/views.py b/sapl/materia/views.py index ded3dc6ea..dedab0ed0 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -1388,7 +1388,6 @@ class TramitacaoCrud(MasterDetailCrud): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) - context['user'] = self.request.user return context @@ -2826,6 +2825,7 @@ def get_pdf_docacessorios(request, pk): % external_name) return response + def configEtiquetaMateriaLegislativaCrud(request): config = ConfigEtiquetaMateriaLegislativa.objects.last() if request.method == "POST": @@ -2837,4 +2837,4 @@ def configEtiquetaMateriaLegislativaCrud(request): return redirect('materia/config_etiqueta_materia.html', {'form': form}) else: form = ConfigEtiquetaMateriaLegislativaForms(instance=config) - return render(request, 'materia/config_etiqueta_materia.html', {'form': form}) \ No newline at end of file + return render(request, 'materia/config_etiqueta_materia.html', {'form': form}) diff --git a/sapl/templates/materia/tramitacao_detail.html b/sapl/templates/materia/tramitacao_detail.html index df108ad13..8b2458720 100644 --- a/sapl/templates/materia/tramitacao_detail.html +++ b/sapl/templates/materia/tramitacao_detail.html @@ -3,7 +3,7 @@ {% block detail_content %} {{ block.super }} - {% if user.is_superuser %} + {% if 'materia.detail_tramitacao' in request.user.get_all_permissions %}
{% if tramitacao.user %}