def METHOD_NAME(
    config_injector, context_factory, tag_factory, user_factory, type
):
    tag = tag_factory(names=["tag"])
    db.session.add(tag)
    db.session.commit()
    config_injector(
        {
            "privileges": {
                "tags:create": model.User.RANK_ADMINISTRATOR,
                "tags:edit:suggestions": model.User.RANK_REGULAR,
                "tags:edit:implications": model.User.RANK_REGULAR,
            }
        }
    )
    with patch("szurubooru.func.tags.get_or_create_tags_by_names"):
        tags.get_or_create_tags_by_names.return_value = ([], ["new-tag"])
        with pytest.raises(errors.AuthError):
            api.tag_api.update_tag(
                context_factory(
                    params={type: ["tag1", "tag2"], "version": 1},
                    user=user_factory(rank=model.User.RANK_REGULAR),
                ),
                {"tag_name": "tag"},
            )