def can_view_cohorts(user):
    """To access Cohort views user need to be
    authenticated and either be an admin, or
    in a group that has the 'view cohorts' permission."""
    return user.is_authenticated and user.has_perm('release.view_releasecohort')