|
|
@ -68,10 +68,11 @@ class DocumentoAdministrativoCrud(Crud): |
|
|
|
|
|
|
|
def has_permission(self): |
|
|
|
app_config = AppConfig.objects.last() |
|
|
|
|
|
|
|
if app_config: |
|
|
|
if app_config.documentos_administrativos == 'O': |
|
|
|
return True |
|
|
|
|
|
|
|
else: |
|
|
|
perms = self.get_permission_required() |
|
|
|
return self.request.user.has_perms(perms) |
|
|
|
|
|
|
@ -80,10 +81,11 @@ class DocumentoAdministrativoCrud(Crud): |
|
|
|
|
|
|
|
def has_permission(self): |
|
|
|
app_config = AppConfig.objects.last() |
|
|
|
|
|
|
|
if app_config: |
|
|
|
if app_config.documentos_administrativos == 'O': |
|
|
|
return True |
|
|
|
|
|
|
|
else: |
|
|
|
perms = self.get_permission_required() |
|
|
|
return self.request.user.has_perms(perms) |
|
|
|
|
|
|
@ -400,10 +402,11 @@ class PesquisarDocumentoAdministrativoView(PermissionRequiredMixin, |
|
|
|
|
|
|
|
def has_permission(self): |
|
|
|
app_config = AppConfig.objects.last() |
|
|
|
|
|
|
|
if app_config: |
|
|
|
if app_config.documentos_administrativos == 'O': |
|
|
|
return True |
|
|
|
|
|
|
|
else: |
|
|
|
perms = self.get_permission_required() |
|
|
|
return self.request.user.has_perms(perms) |
|
|
|
|
|
|
@ -621,10 +624,11 @@ class TramitacaoAdmCrud(MasterDetailCrud): |
|
|
|
|
|
|
|
def has_permission(self): |
|
|
|
app_config = AppConfig.objects.last() |
|
|
|
|
|
|
|
if app_config: |
|
|
|
if app_config.documentos_administrativos == 'O': |
|
|
|
return True |
|
|
|
|
|
|
|
else: |
|
|
|
perms = self.get_permission_required() |
|
|
|
return self.request.user.has_perms(perms) |
|
|
|
|
|
|
@ -633,10 +637,11 @@ class TramitacaoAdmCrud(MasterDetailCrud): |
|
|
|
|
|
|
|
def has_permission(self): |
|
|
|
app_config = AppConfig.objects.last() |
|
|
|
|
|
|
|
if app_config: |
|
|
|
if app_config.documentos_administrativos == 'O': |
|
|
|
return True |
|
|
|
|
|
|
|
else: |
|
|
|
perms = self.get_permission_required() |
|
|
|
return self.request.user.has_perms(perms) |
|
|
|
|
|
|
|