'This method must be sent an instance of Library() or LibraryFolder().  Recursive execution produces a
comma-separated string of folder ids whose folders do NOT meet the criteria for showing. Along with
the string, True is returned if the current user has permission to perform any 1 of actions_to_check
on library_item. Otherwise, cycle through all sub-folders in library_item until one is found that meets
this criteria, if it exists.  This method does not necessarily scan the entire library as it returns
when it finds the first library_item that allows user to perform any one action in actions_to_check.'

def show_library_item(self, user, roles, library_item, actions_to_check, hidden_folder_ids=''):

    for action in actions_to_check:
        if self.allow_action(roles, action, library_item):
            return (True, hidden_folder_ids)
    if isinstance(library_item, self.model.Library):
        return self.show_library_item(user, roles, library_item.root_folder, actions_to_check, hidden_folder_ids='')
    if isinstance(library_item, self.model.LibraryFolder):
        for folder in library_item.active_folders:
            (can_show, hidden_folder_ids) = self.show_library_item(user, roles, folder, actions_to_check, hidden_folder_ids=hidden_folder_ids)
            if can_show:
                return (True, hidden_folder_ids)
            if hidden_folder_ids:
                hidden_folder_ids = ('%s,%d' % (hidden_folder_ids, folder.id))
            else:
                hidden_folder_ids = ('%d' % folder.id)
    return (False, hidden_folder_ids)
