def METHOD_NAME(allowed_method_names=None):
    # Currently, the views in this file use the legacy permission-checking
    # approach, so this decorator disables the default DRF permission classes.
    # TODO: migrate to DRF permissions, make the views compatible with drf-spectacular,
    # and remove this decorator.
    def decorator(view):
        view = permission_classes([IsAuthenticated])(view)
        view = api_view(allowed_method_names)(view)
        view = extend_schema(exclude=True)(view)
        return view
    return decorator