This module seems to do exactly what I need.

When will it be available for 5.x?