'Lists dashboards modified in the last 7 days.'

@require_permission('list_dashboards')
def get(self):

    if settings.FEATURE_DUMB_RECENTS:
        dashboards = models.Dashboard.all(self.current_org, self.current_user.group_ids, self.current_user.id).order_by(models.Dashboard.updated_at.desc()).limit(10)
        dashboards = [d.to_dict() for d in dashboards]
    else:
        recent = [d.to_dict() for d in models.Dashboard.recent(self.current_org, self.current_user.group_ids, self.current_user.id, for_user=True)]
        global_recent = []
        if (len(recent) < 10):
            global_recent = [d.to_dict() for d in models.Dashboard.recent(self.current_org, self.current_user.group_ids, self.current_user.id)]
        dashboards = take(20, distinct(chain(recent, global_recent), key=(lambda d: d['id'])))
    return dashboards
