#NEWLINE# def _get_user_queues( user ) : #NEWLINE# #INDENT# 'Return the list of Queues the user can access.\n\n    :param user: The User (the class should have the has_perm method)\n    :return: A Python list of Queues\n    ' #NEWLINE# all_queues = Queue . objects . all ( ) #NEWLINE# limit_queues_by_user = ( helpdesk_settings . HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION and ( not user . is_superuser ) ) #NEWLINE# if limit_queues_by_user : #NEWLINE# #INDENT# id_list = [ q . pk for q in user if user . has_perm ( q . permission_name ) ] #NEWLINE# return all_queues . filter ( pk__in = id_list ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return all_queues