def METHOD_NAME(
    self, mock_command
):
    """A user with permissions that is not staff should not be allowed to bootstrap ES."""
    user = UserFactory()
    self.client.login(username=user.username, password="password")
    # Add the necessary permission
    self.add_permission(user, "can_manage_elasticsearch")
    url = "/api/v1.0/bootstrap-elasticsearch/"
    response = self.client.post(url, follow=True)
    self.assertEqual(response.status_code, 403)
    self.assertEqual(
        response.content, b"You are not allowed to manage the search index."
    )
    self.assertFalse(mock_command.called)