def reftrack_restricted_data(rt, role, attr):
    """Return the data for restriction of the given attr of the given reftrack

    :param rt: the :class:`jukeboxcore.reftrack.Reftrack` holds the data
    :type rt: :class:`jukeboxcore.reftrack.Reftrack`
    :param role: item data role
    :type role: QtCore.Qt.ItemDataRole
    :returns: data for the restriction
    :rtype: depending on role
    :raises: None
    """
    if role == QtCore.Qt.DisplayRole:
        if rt.is_restricted(getattr(rt, attr, None)):
            return "Restricted"
        else:
            return "Allowed"
Return the data for restriction of the given attr of the given reftrack

    :param rt: the :class:`jukeboxcore.reftrack.Reftrack` holds the data
    :type rt: :class:`jukeboxcore.reftrack.Reftrack`
    :param role: item data role
    :type role: QtCore.Qt.ItemDataRole
    :returns: data for the restriction
    :rtype: depending on role
    :raises: None