'THIS METHOD IS A TEMPORARY ADDITION. It\'ll allow us to fix the
regression in history-wide actions, and will be removed in the first
release after 17.01'

@web.expose
def adjust_hidden(self, trans, id=None, **kwd):

    action = kwd.get('user_action', None)
    if (action == 'delete'):
        for hda in trans.history.datasets:
            if (not hda.visible):
                hda.mark_deleted()
    elif (action == 'unhide'):
        trans.history.unhide_datasets()
    trans.sa_session.flush()
