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

@web.expose
@web.require_login("set    history's    accessible    flag")
def set_accessible_async(self, trans, id=None, accessible=False):

    history = self.history_manager.get_owned(self.decode_id(id), trans.user, current_history=trans.history)
    importable = (accessible in ['True', 'true', 't', 'T'])
    if (history and (history.importable != importable)):
        if importable:
            self._make_item_accessible(trans.sa_session, history)
        else:
            history.importable = importable
        trans.sa_session.flush()
    return
