Browse Source

trata comportamento dos docs acess de docs adms

pull/2465/head
Leandro Roberto 6 years ago
parent
commit
2585079da1
  1. 14
      sapl/api/views.py

14
sapl/api/views.py

@ -394,6 +394,20 @@ class _DocumentoAdministrativoViewSet(SaplSetViews['protocoloadm']['documentoadm
return qs return qs
class _DocumentoAcessorioAdministrativoViewSet(
SaplSetViews['protocoloadm']['documentoacessorioadministrativo']):
permission_classes = (
_DocumentoAdministrativoViewSet.DocumentoAdministrativoPermission, )
def get_queryset(self):
qs = super().get_queryset()
if self.request.user.is_anonymous():
qs = qs.exclude(documento__restrito=True)
return qs
SaplSetViews['base']['autor'] = _AutorViewSet.build_class_with_actions() SaplSetViews['base']['autor'] = _AutorViewSet.build_class_with_actions()
SaplSetViews['materia']['proposicao'] = _ProposicaoViewSet SaplSetViews['materia']['proposicao'] = _ProposicaoViewSet
SaplSetViews['parlamentares']['parlamentar'] = _ParlamentarViewSet SaplSetViews['parlamentares']['parlamentar'] = _ParlamentarViewSet

Loading…
Cancel
Save