diff --git a/sapl/compilacao/models.py b/sapl/compilacao/models.py index ff6cbdab1..812e48e27 100644 --- a/sapl/compilacao/models.py +++ b/sapl/compilacao/models.py @@ -266,10 +266,13 @@ class TextoArticulado(TimestampedMixin): user.has_perm( 'compilacao.change_your_dispositivo_edicao_dinamica')) - def has_view_permission(self, request): + def has_view_permission(self, request=None): if self.privacidade in (STATUS_TA_IMMUTABLE_PUBLIC, STATUS_TA_PUBLIC): return True + if not request: + return False + if request.user in self.owners.all(): return True diff --git a/sapl/templates/compilacao/text_list__embedded.html b/sapl/templates/compilacao/text_list__embedded.html index f5235751b..a448c9dd4 100644 --- a/sapl/templates/compilacao/text_list__embedded.html +++ b/sapl/templates/compilacao/text_list__embedded.html @@ -1,4 +1,3 @@ -{% extends "base.html" %} {% load i18n %} {% load compilacao_filters %} {% load common_tags %} @@ -9,20 +8,6 @@ {% endblock %} -{% block navigation %}{% endblock %} - -{% block main_header %}{% endblock %} -{% block title %}{% endblock %} -{% block sections_nav %}{% endblock %} -{% block extra_sections_nav %}{% endblock %} -{% block actions %}{% endblock %} -{% block dsp_actions %}{% endblock %} - -{% block detail_content %}{% endblock %} -{% block footer_container %}{% endblock %} - -{% block base_content %} -