Nonprofit organizations that seek to advance the political or social agendas of political candidates must be careful to keep their distance from those candidates. It is not uncommon for candidates to raise funds for 501(c)(4)s, SuperPACs or other 527-like organizations, and these groups often hire former political employees or subcontractors to work for them on issues of mutual concern.
But, it is easy to cross the line. Public criticism or even election law complaints are never helpful to a candidate, even if they are eventually dismissed, as were the charges outlined in this New York Times article about Mayor de Blasio. One way to avoid problems is for candidates and 501(c)(4)s to draw clear boundaries in a firewall policy and then strictly enforce those protocols.