'Set visualization\'s importable attribute and slug.'

@web.expose
@web.require_login('use    Galaxy    visualizations')
def set_accessible_async(self, trans, id=None, accessible=False):

    visualization = self.get_visualization(trans, id)
    importable = (accessible in ['True', 'true', 't', 'T'])
    if (visualization and (visualization.importable != importable)):
        if importable:
            self._make_item_accessible(trans.sa_session, visualization)
        else:
            visualization.importable = importable
        trans.sa_session.flush()
    return
