code: def get(self, request, *args, **kwargs):
          '''
          Invoices can be viewed only if the validation string is provided, unless
          the user is logged in and has view_all_invoice permissions
          '''
          user_has_validation_string = self.get_object().validationString
          user_has_permissions = request.user.has_perm('core.view_all_invoices')
          if request.GET.get('v', None) == user_has_validation_string or user_has_permissions:
              return super(ViewInvoiceView, self).get(request, *args, **kwargs)
          return self.handle_no_permission(f get(self, request, *args, **kwargs):
          '''
          Invoices can be viewed only if the validation string is provided, unless
          the user is logged in and has view_all_invoice permissions
          '''
          user_has_validation_string = self.get_object().validationString
          user_has_permissions = request.user.has_perm('core.view_all_invoices')
          if request.GET.get('v', None) == user_has_validation_string or user_has_permissions:
              return super(ViewInvoiceView, self).get(request, *args, **kwargs)
          return self.handle_no_permission()
docs: Invoices can be viewed only if the validation string is provided, unless
          the user is logged in and has view_all_invoice permissions