def METHOD_NAME(service_id, template_folder_id):
    data = request.get_json()
    validate(data, post_update_template_folder_schema)
    template_folder = dao_get_template_folder_by_id_and_service_id(template_folder_id, service_id)
    template_folder.name = data["name"]
    if "users_with_permission" in data:
        template_folder.users = [dao_get_service_user(user_id, service_id) for user_id in data["users_with_permission"]]
    dao_update_template_folder(template_folder)
    return jsonify(data=template_folder.serialize()), 200