code: def dispatch(self, request, *args, **kwargs):
          
          if False:  # TODO do permission check based on Model
              raise PermissionDenied
          return super().dispatch(request, *args, **kwargs)
docs: Validate if user can use view