def METHOD_NAME(request, post, data):
    if not request.me.is_moderator:
        raise AccessDenied()
    do_common_admin_and_curator_actions(request, post, data)
    # Close comments
    if data["toggle_is_commentable"]:
        post.is_commentable = not post.is_commentable
        post.save()
    # Transfer ownership to the given username
    if data["transfer_ownership"]:
        user = User.objects.filter(slug=data["transfer_ownership"].strip()).first()
        if user:
            post.author = user
            post.save()
    if data["refresh_linked"]:
        LinkedPost.create_links_from_text(post, post.text)
        post_comments = Comment.visible_objects().filter(post=post, is_deleted=False)
        for comment in post_comments:
            LinkedPost.create_links_from_text(comment.post, comment.text)
    return redirect("show_post", post.type, post.slug)