code: def get_allow_future(self):
          
          qs = self.get_queryset()
          post_edit_permission = '{}.edit_{}'.format(
              qs.model._meta.app_label, qs.model._meta.model_name
          )
          if self.request.user.has_perm(post_edit_permission):
              return True
          return False
docs: Only superusers and users with the permission can edit the post.